Skip to content

Commit 7ebb618

Browse files
committed
Minor Fixes
1 parent db47ba5 commit 7ebb618

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

docs/mp/telemetry.adoc

+25-27
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ include::{rootdir}/includes/mp.adoc[]
3737
3838
== Overview
3939
40-
41-
4240
include::{rootdir}/includes/dependencies.adoc[]
4341
4442
[source,xml]
@@ -100,7 +98,7 @@ class HelidonBean {
10098
}
10199
}
102100
----
103-
<1> Simple `@WithSpan` annotation usage;
101+
<1> Simple `@WithSpan` annotation usage.
104102
<2> Additional attributes can be set to the annotation.
105103
106104
You can also inject OpenTelemetry `Tracer` using the regular `@Inject` annotation and use `SpanBuilder` to manually create, star, and stop Spans.
@@ -128,10 +126,10 @@ public class HelidonEndpoint {
128126
}
129127
}
130128
----
131-
<1> Inject `Tracer`;
132-
<2> Use `Tracer.spanBuilder` to create and start new `Span`;
129+
<1> Inject `Tracer`.
130+
<2> Use `Tracer.spanBuilder` to create and start new `Span`.
133131
134-
To obtain the current span, it can be injected with CDI. The current span can also be obtained using the static method `Span.current()`.
132+
To obtain the current span, it can be injected by CDI. The current span can also be obtained using the static method `Span.current()`.
135133
136134
.Inject the current span
137135
[source, java]
@@ -155,9 +153,9 @@ public class HelidonEndpoint {
155153
}
156154
}
157155
----
158-
<1> Inject the current span;
159-
<2> Use the injected span;
160-
<3> Use `Span.current()` to access the current span;
156+
<1> Inject the current span.
157+
<2> Use the injected span.
158+
<3> Use `Span.current()` to access the current span.
161159
162160
The same functionality is available for the `Baggage` API:
163161
@@ -183,9 +181,9 @@ public class HelidonEndpoint {
183181
}
184182
}
185183
----
186-
<1> Inject the current baggage;
187-
<2> Use the injected baggage;
188-
<3> Use `Baggage.current()` to access the current baggage;
184+
<1> Inject the current baggage.
185+
<2> Use the injected baggage.
186+
<3> Use `Baggage.current()` to access the current baggage.
189187
190188
191189
== Configuration
@@ -254,8 +252,8 @@ Together with Helidon Telemetry dependency, an OpenTelemetry Exporter dependency
254252
<artifactId>opentelemetry-exporter-jaeger</artifactId> <2>
255253
</dependency>
256254
----
257-
<1> Helidon Telemetry dependency
258-
<2> OpenTelemetry Jaeger exporter
255+
<1> Helidon Telemetry dependency.
256+
<2> OpenTelemetry Jaeger exporter.
259257
260258
Add these lines to `META-INF/microprofile-config.properties`:
261259
@@ -266,9 +264,9 @@ otel.sdk.disabled=false <1>
266264
otel.traces.exporter=jaeger <2>
267265
otel.exporter.name=greeting-service <3>
268266
----
269-
<1> Enable MicroProfile Telemetry
270-
<2> Set exporter to Jaeger
271-
<3> Name of our service
267+
<1> Enable MicroProfile Telemetry.
268+
<2> Set exporter to Jaeger.
269+
<3> Name of our service.
272270
273271
Here we enable MicroProfile Telemetry, set tracer to "jaeger" and give a name, which will be used to identify our service in the tracer.
274272
@@ -286,7 +284,7 @@ for our example we use Jaeger managing the tracing data. If you prefer to use Zi
286284
287285
=== Tracing at Method Level
288286
289-
Let us create simple services and use `@WithSpan` and `Tracer` to create span and let MicroProfile Opentelemetry handle them
287+
Let us create simple services and use `@WithSpan` and `Tracer` to create span and let MicroProfile OpenTelemetry handle them
290288
291289
[source, java]
292290
----
@@ -336,10 +334,10 @@ public JsonObject useCustomSpan(){
336334
.build();
337335
}
338336
----
339-
<1> Inject Opentelemetry `Tracer`
340-
<2> Create Span around the method `useCustomSpan()`
341-
<3> Create a custom `INTERNAL` span and start it
342-
<4> End the custom span
337+
<1> Inject Opentelemetry `Tracer`.
338+
<2> Create Span around the method `useCustomSpan()`.
339+
<3> Create a custom `INTERNAL` span and start it.
340+
<4> End the custom span.
343341
344342
Let us call the custom endpoint:
345343
@@ -367,9 +365,9 @@ public String outbound() {
367365
return target.request().accept(MediaType.TEXT_PLAIN).get(String.class); <3>
368366
}
369367
----
370-
<1> Inject `WebTarget` pointing to Secondary service
371-
<2> Wrap method using `WithSpan`
372-
<3> Call the secondary service;
368+
<1> Inject `WebTarget` pointing to Secondary service.
369+
<2> Wrap method using `WithSpan`.
370+
<3> Call the secondary service.
373371
374372
The secondary service is very simple, it has only one method, which is also annotated with `@WithSpan`.
375373
@@ -382,8 +380,8 @@ public String getSecondaryMessage() {
382380
return "Secondary"; <2>
383381
}
384382
----
385-
<1> Wrap method in a span
386-
<2> Return a string
383+
<1> Wrap method in a span.
384+
<2> Return a string.
387385
388386
Let us call the _Outbound_ endpoint:
389387

0 commit comments

Comments
 (0)