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
Copy file name to clipboardExpand all lines: modules/howtos/pages/observability-tracing.adoc
+14-47Lines changed: 14 additions & 47 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.
127
+
=== OpenTelemetry Troubleshooting
170
128
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.)
129
+
* There are many ways to export spans.
130
+
The example is exporting OpenTelemetry Protocol (OTLP) spans over GRPC to port 4317, which we believe is the _de facto_ standard for OpenTelemetry.
131
+
Make sure that your receiver is compatible with this, e.g. has these ports open and is ready to receive OTLP traffic over GRPC.
132
+
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`.
133
+
* 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).
134
+
`SimpleSpanProcessor` can be used instead, though is not likely suitable for production.
135
+
* The example above uses `Sampler.alwaysOn()`, which exports every span.
136
+
This may need to be reduced to avoid overwhelming the receiver, with e.g. `Sampler.traceIdRatioBased(0.01)` to sample 1% of all traces.
137
+
* 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.
138
+
Among other capabilities the collector can log traces it receives, making for easier debugging.
172
139
173
140
=== Parent spans
174
141
@@ -199,7 +166,7 @@ You need to include the `tracing-opentracing` module:
199
166
</dependency>
200
167
----
201
168
202
-
And then wrap the Tracer:
169
+
And then create an OpenTracing `Tracer` and pass it to the SDK:
0 commit comments