Skip to content

Commit

Permalink
Fix language style
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
  • Loading branch information
dalexandrov committed Nov 16, 2023
1 parent 9558a91 commit 875a711
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions docs/mp/telemetry.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ include::{rootdir}/includes/mp.adoc[]
- <<Usage, Usage>>
- <<Configuration, Configuration>>
- <<Examples, Examples>>
- <<Additional Information, Additional Information>>
- <<Reference, Reference>>
== Overview
Expand Down Expand Up @@ -68,7 +67,7 @@ There are two ways to work with Telemetry, using:
For Automatic Instrumentation, OpenTelemetry provides a JavaAgent. The Tracing API allows for the automatic participation in distributed tracing of Jakarta RESTful Web Services (both server and client) as well as MicroProfile REST Clients, without requiring any modifications to the code. This is achieved through automatic instrumentation.
For Manual Instrumentation there is a set of annotations and access to OpenTelemetry API.
For Manual Instrumentation, there is a set of annotations and access to OpenTelemetry API.
`@WithSpan` - By adding this annotation to a method in any Jakarta CDI aware bean, a new Span will be created and any necessary connections to the current Trace context will be established. Additionally, the `SpanAttribute` annotation can be used to mark method parameters that should be included in the Trace.
Expand Down Expand Up @@ -99,7 +98,7 @@ class HelidonBean {
}
----
<1> Simple `@WithSpan` annotation usage.
<2> Additional attributes can be set to the annotation.
<2> Additional attributes can be set on a method.
You can also inject OpenTelemetry `Tracer` using the regular `@Inject` annotation and use `SpanBuilder` to manually create, star, and stop Spans.
Expand Down Expand Up @@ -195,14 +194,14 @@ To configure OpenTelemetry, MicroProfile Config must be used, and the configurat
- link:https://github.com/open-telemetry/opentelemetry-java/tree/v1.19.0/sdk-extensions/autoconfigure[OpenTelemetry SDK Autoconfigure] (excluding properties related to Metrics and Logging)
- link:https://opentelemetry.io/docs/instrumentation/java/manual/[Manual Instrumentation]
Please consult with the links above for all configurations properties usage.
Please consult with the links above for all configurations' properties usage.
The property should be declared in `microprofile-config.properties` file in order to be processed correctly.
The property should be declared in `microprofile-config.properties` file to be processed correctly.
=== OpenTelemetry Java Agent
The OpenTelemetry Java Agent may influence the work of MicroProfile Telemetry, on how the objects are created and configured. Helidon will do "best effort" detect the use of the agent. But, if there is a decision to run the Helidon app with the agent, a configuration property should be set:
The OpenTelemetry Java Agent may influence the work of MicroProfile Telemetry, on how the objects are created and configured. Helidon will do "best effort" to detect the use of the agent. But if there is a decision to run the Helidon app with the agent, a configuration property should be set:
`otel.agent.present=true`
Expand Down Expand Up @@ -273,7 +272,7 @@ Here we enable MicroProfile Telemetry, set tracer to "jaeger" and give a name, w
[NOTE]
====
For this example, you will use Jaeger to manage data tracing. If you prefer to use Zipkin, please set `otel.traces.exporter` property to "zipkin". For more information using about Zipkin, see link:https://zipkin.io/[]. Also a corresponding Maven dependency for the exporter should be added:
For this example, you will use Jaeger to manage data tracing. If you prefer to use Zipkin, please set `otel.traces.exporter` property to "zipkin". For more information using about Zipkin, see link:https://zipkin.io/[]. Also, a corresponding Maven dependency for the exporter should be added:
----
<dependency>
<groupId>io.opentelemetry</groupId>
Expand Down Expand Up @@ -370,7 +369,7 @@ public String outbound() {
<2> Wrap method using `WithSpan`.
<3> Call the secondary service.
The secondary service is very simple, it has only one method, which is also annotated with `@WithSpan`.
The secondary service is basic; it has only one method, which is also annotated with `@WithSpan`.
.Secondary service
[source, java]
Expand Down Expand Up @@ -398,10 +397,6 @@ Launch the Jaeger UI at link:http://localhost:16686/[] to see the expected outpu
image::telemetry/telemetry-outbound-jaeger.png[Secondary service outbound call]
== Additional Information
== Reference
* link:https://download.eclipse.org/microprofile/microprofile-telemetry-1.0/tracing/microprofile-telemetry-tracing-spec-1.0.pdf[MicroProfile Telemetry Specification]
Expand Down

0 comments on commit 875a711

Please sign in to comment.