This plugin embraces OpenTelemetry Autoconfiguration using environment-based properties to configure OpenTelemetry SDK.
If you have not already done so, prepare the broker distribution before running the example.
To run the example, simply type mvn verify from this directory, or mvn -PnoServer verify if you want to start and create the broker manually.
NOTE: You must have jeager running at
http://localhost:16686
. You can learn more about Jeager here
command to start your jeager instance
docker run -p 16686:16686 -p 14250:14250 jaegertracing/all-in-one:<your_version>
After seeing a Build Success
, open the browser, connect to your Jeager running instance and check for spans.
The tracing.properties
has configuration properties that autoconfigure Opentelemetry Exporter . We reconfigured it and used Jeager as the default exporter, sending data through at http://localhost:14250
You can change this by choosing to use:
otlp exporter , by uncommenting (removing #
) the following
otel.traces.exporter=otlp
otel.exporter.otlp.endpoint=http://localhost:4317
Change port and host to match your running instance.otel.exporter.otlp.traces.endpoint=http://localhost:4317
Change port and host to match your running instance.Zipkin Exporter , by uncommenting (removing #
) the following
otel.traces.exporter=zipkin
otel.exporter.zipkin.endpoint=http://localhost:9411/api/v2/spans
. Change port and host to match your running instance.Note: command to start Zipkin instance
docker run -p 9411:9411 openzipkin/zipkin
You can also change the default service name from opentelemetry_plugin
to any string by changing the value of otel.service.name
Zipkin: The quickest way is by use of docker.
docker run -d -p 9411:9411 openzipkin/zipkin
http://localhost:9411
and on the page that appears, click the Run Queries button.Jeager: The quickest way is by use of docker.
docker run -d --name jaeger \ e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \ p 5775:5775/udp \ p 6831:6831/udp \ p 6832:6832/udp \ p 5778:5778 \ p 16686:16686 \ p 14250:14250 \ p 14268:14268 \ p 14269:14269 \ p 9411:9411 \ jaegertracing/all-in-one:1.30
http://localhost:16686/search
, click Search, select your service-name from the dropdown below the service name and finally click Find Traces Button.