You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Jaeger example is outdated and has bitrotted due to
the OpenTelemetry APIs changing.
But there are dozens of OpenTelemetry backends. Rather
than providing instructions on connection to just one,
let's instead standardise on one consistent and
simple approach, which is exporting OpenTelemetry traces
in OTLP format. These can be sent to any OTLP-compatible
backend, which is pretty much all of them, including Jaeger.
Also added some troubleshooting tips.
Copy file name to clipboardExpand all lines: modules/howtos/pages/observability-tracing.adoc
+8-48Lines changed: 8 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ More information will be provided as we get closer to stabilization.
72
72
The built-in tracer is great if you do not have a centralized monitoring system, but if you already plug into the OpenTelemetry ecosystem we want to make sure to provide first-class support.
73
73
74
74
=== Exporting to OpenTelemetry
75
-
This method exports tracing telemetry in OpenTelemetry's standard format (OTLP), which can be sent to any OTLP-compatible backend/processor such as Jaeger, Zipkin or `opentelemetry-collector`.
75
+
This method exports tracing telemetry in OpenTelemetry's standard format (OTLP), which can be sent to any OTLP-compatible receiver such as Jaeger, Zipkin or `opentelemetry-collector`.
76
76
77
77
Add this to your Maven, or the equivalent to your build tool of choice:
At this point, whichever method you have used, the SDK will automatically be exporting spans and you should see them in your backend of choice.
170
-
171
-
(Bear in mind during testing that the exporter may batch spans and hence not export them if the application exits quickly enough. This can be configured on the `BatchSpanProcessor` or `JaegerGrpcSpanExporter` objects.)
127
+
=== OpenTelemetry Troubleshooting
128
+
* There are many ways to export spans. The example is exporting OpenTelemetry Protocol (OTLP) spans over GRPC to port 4317, which we believe is the defacto standard for OpenTelemetry. Make sure that your receiver is compatible with this, e.g. has these ports open and is ready to receive OTLP traffic over GRPC. With https://www.jaegertracing.io/docs/1.41/getting-started/[Jaeger in Docker] this is achieved with the options `-e COLLECTOR_OTLP_ENABLED=true` and `-p 4317:4317`.
129
+
* The exporter used in this example is `BatchSpanProcessor`, which may not have a chance to export spans if the application exits very quickly (e.g. a test application). `SimpleSpanProcessor` can be used instead, though is not likely suitable for production.
130
+
* The example above uses `Sampler.alwaysOn()`, which exports every span. This may need to be reduced to avoid overwhelming the receiver, with e.g. `Sampler.traceIdRatioBased(0.01)` to sample 1% of all traces.
131
+
* It can be worth sending traces into https://opentelemetry.io/docs/collector/[OpenTelemetry Collector], and forwarding them on from there to your receiver of choice. Among other capabilities the collector can log traces it receives, making for easier debugging.
172
132
173
133
=== Parent spans
174
134
@@ -199,7 +159,7 @@ You need to include the `tracing-opentracing` module:
199
159
</dependency>
200
160
----
201
161
202
-
And then wrap the Tracer:
162
+
And then create an OpenTracing `Tracer` and pass it to the SDK:
0 commit comments