Skip to content

Commit

Permalink
docs: make Antora errors stop the build; fix most warnings (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
ennru authored Nov 27, 2024
1 parent 0d6d1fe commit a0580dd
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ antora-local:
-v ${ROOT_DIR}:/antora \
--rm \
-t ${antora_docker_image}:${antora_docker_image_tag} \
--cache-dir=.cache/antora --stacktrace --log-failure-level=fatal \
--cache-dir=.cache/antora --stacktrace --log-failure-level=error \
docs/antora-playbook-local.yml

antora-prod:
Expand Down
2 changes: 2 additions & 0 deletions docs/src/modules/ROOT/partials/include.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// global attributes

:sample-base-url: https://github.com/akka/akka-sdk/blob/main/samples
// Docker Registry HTTP API Version
:docker_registry_http_api_version: v1

include::partial$attributes.adoc[]
2 changes: 1 addition & 1 deletion docs/src/modules/java/pages/http-endpoints.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ include::example$shopping-cart-quickstart/src/main/java/shoppingcart/api/Shoppin
<3> GET endpoint path is combined with a path parameter name, e.g. `/carts/123`.
<4> The component client can be used to interact with other components.
<5> Result of a request to a component is a `CompletionStage<T>`, it can be returned directly to let Akka serialize it.
<6> Use path parameter `{cartId}` in combination with request body `ShoppingCart.LineItem`.
<6> Use path parameter `+{cartId}+` in combination with request body `ShoppingCart.LineItem`.
<7> Result of request mapped to a more suitable response, in this case, `200 Ok` with an empty body.

For more details see xref:component-and-service-calls.adoc[]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/java/pages/shopping-cart-quickstart.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ include::example$shopping-cart-quickstart/src/main/java/shoppingcart/api/Shoppin
<3> GET endpoint path is combined with a path parameter name, e.g. `/carts/123`.
<4> `ComponentClient` calling a command handler on an Event Sourced Entity from inside an Endpoint.
<5> Result of request is a `CompletionStage<T>`, in this case a `CompletionStage<ShoppingCart>`.
<6> Use path parameter `{cartId}` in combination with request body `ShoppingCart.LineItem`.
<6> Use path parameter `+{cartId}+` in combination with request body `ShoppingCart.LineItem`.
<7> Map request to a more suitable response, in this case an `HTTP 200 OK` response.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ This will open the observability descriptor in a text editor. After saving and e
After updating your observability configuration, you will need to restart a service to apply the new configuration. Akka automatically makes that a rolling restart.
====

[#activating_tracing]
=== Activating tracing (Beta)

The generation of traces is disabled by default. To enable it you need to set xref:reference:descriptors/service-descriptor.adoc#_servicespec[telemetry/tracing/enabled] to `true` in the service descriptor. Like the following:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
= View traces

Akka projects have the traces dashboard built-in as part of the Control Tower in the Akka Console. This is available out-of-the-box. You can find your traces here as long as you have xref:operations:observability-and-monitoring/observability-exports.adoc#_activating_tracing_beta[enabled the traces] in your service.
Akka projects have the traces dashboard built-in as part of the Control Tower in the Akka Console. This is available out-of-the-box. You can find your traces here as long as you have xref:operations:observability-and-monitoring/observability-exports.adoc#activating_tracing[enabled the traces] in your service.

In the top panel you have the list of traces you can inspect. When you click on one of them, the contents of the trace are displayed in the panel below. As shown in the figure.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
= View logs
include::ROOT:partial$include.adoc[]

:page-supergroup-browser-cli: Interface

Akka provides logs that you can view in the Console or access with the CLI. For each service instance we aggregate a maximum of 1MB of log data. You can capture all log output by attaching a logging provider, such as Google Cloud's operations suite (formerly Stackdriver), as described xref:observability-and-monitoring/observability-exports.adoc#_google_cloud[here].
Expand Down Expand Up @@ -31,7 +32,7 @@ Logs can be exported for searching, reporting, alerting and long term storage by

== Correlating logs

You can correlate your log statements, those that you write in your application, by adding the MDC pattern `%mdc{trace_id}` to your log file when tracing is xref:operations:observability-and-monitoring/observability-exports.adoc#_activating_tracing_beta[enabled]. Like the following:
You can correlate your log statements, those that you write in your application, by adding the MDC pattern `%mdc{trace_id}` to your log file when tracing is xref:operations:observability-and-monitoring/observability-exports.adoc#activating_tracing[enabled]. Like the following:

[source,xml]
.logback.xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fd21044c-b973-4220-8f65-0f7d317bb23b superuser jane.citizen jane.citizen@e

You can grant a role to a user in two ways:

==== 1. Invite a User by Email
=== 1. Invite a User by Email
Send an email invitation with the following command:

[source,command window]
Expand All @@ -56,7 +56,7 @@ akka organizations invitations create --organization <organization name> \
The user will receive an email to join the organization. Once accepted, the role binding will be created.


==== 2. Add a Role Directly
=== 2. Add a Role Directly

If the user is already a member, you can assign roles directly:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ akka config set project <project name>

You can grant a project role to a user in two ways:

==== 1. Invite a user to the project by e-mail
=== 1. Invite a user to the project by e-mail
Invite a user to join the project and assign them a role by using the following command:

[source,command window]
Expand All @@ -69,7 +69,7 @@ akka roles invitations invite-user <email address> --role <role>

The user will receive an email inviting them to join the project. Upon acceptance, the role binding will be created.

==== 2. Add a role directly
=== 2. Add a role directly
If the user is already a member of the project, or the project is part of an organization and the user belongs to that organization, you can assign roles directly without sending an invitation.

* By e-mail:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public record CreateUser(String username, String email) { }
// tag::checking-principals[]
@Get
public String checkingPrincipals() {
// tag::request-context[]
var principals = requestContext().getPrincipals();
// end::request-context[]
if (principals.isInternet()) {
return "accessed from the Internet";
} else if (principals.isSelf()) {
Expand Down

0 comments on commit a0580dd

Please sign in to comment.