Este contenido no está disponible en el idioma seleccionado.
Chapter 10. Distributed tracing
The client offers distributed tracing based on the Jaeger implementation of the OpenTracing standard.
10.1. Enabling distributed tracing Copiar enlaceEnlace copiado en el portapapeles!
Use the following steps to enable tracing in your application:
Procedure
Add the Jaeger client dependency to your POM file.
<dependency> <groupId>io.jaegertracing</groupId> <artifactId>jaeger-client</artifactId> <version>${jaeger-version}</version> </dependency>
<dependency> <groupId>io.jaegertracing</groupId> <artifactId>jaeger-client</artifactId> <version>${jaeger-version}</version> </dependency>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ${jaeger-version}
must be 1.0.0 or later.Add the
jms.tracing
option to your connection URI. Set the value toopentracing
.Example: A connection URI with tracing enabled
amqps://example.net?jms.tracing=opentracing
amqps://example.net?jms.tracing=opentracing
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Register the global tracer.
Example: Global tracer registration
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure your environment for tracing.
Example: Tracing configuration
export JAEGER_SAMPLER_TYPE=const export JAEGER_SAMPLER_PARAM=1 java -jar example.jar net.example.Example
$ export JAEGER_SAMPLER_TYPE=const $ export JAEGER_SAMPLER_PARAM=1 $ java -jar example.jar net.example.Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The configuration shown here is for demonstration purposes. For more information about Jaeger configuration, see Configuration via Environment and Jaeger Sampling.
To view the traces your application captures, use the Jaeger Getting Started to run the Jaeger infrastructure and console.