Xitric / java-opentelemetry-bridge

OpenTracing-OpenTelemetry Tracer Bridge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenTelemetry Tracer Bridge

OpenTracing Bridge for OpenTelemetry Tracers

Build Status Coverage Status Javadocs Released Version

The OpenTelemetry Tracer Bridge is a Trace Exporter that uses the OpenTelemetry OpenTracing Shim to provide a TracerFactory implementation (specified by the OpenTracing TracerResolver).

Tracer parameters can be configured via the system properties:

Parameters

OpenTelemetry Tracer Bridge parameters use the prefix ot.otel.:

Parameter Use Description
ot.otel.exporter Optional Name of the OpenTelemetry exporter:
jaeger, inmemory, or logging.
ot.otel.exporter.reportOnlySampled Optional Whether only sampled spans should be reported.

If ot.otel.exporter=jaeger, the following parameters apply to the Jaeger exporter:

Parameter Use Description
ot.otel.exporter.jaeger.serviceName Required The service name.
ot.otel.exporter.jaeger.address Required Target address (<HOST:PORT>) of the Jaeger gRPC endpoint.
ot.otel.exporter.jaeger.deadline Optional The max waiting time for the collector to process each span batch.

Usage with SpecialAgent

The OpenTracing SpecialAgent automatically instruments 3rd-party libraries in Java applications. Starting with SpecialAgent v1.5.2 (usage updated to spec of SpecialAgent v1.7.0), the OpenTelemetry Tracer Bridge is included as a Trace Exporter, which allows traces to be sent to OpenTelemetry tracers. The OpenTelemetry Tracer Bridge can be enabled with the -Dsa.exporter=otel property:

java -javaagent:opentracing-specialagent-1.7.0.jar \
     -Dsa.exporter=otel \
     -Dot.otel.exporter=jaeger \
     -Dot.otel.exporter.jaeger.serviceName=myService \
     -Dot.otel.exporter.jaeger.address=127.0.0.1:1234 \
     -jar MyService.jar

License

This project is licensed under the Apache 2 License - see the LICENSE.txt file for details.

About

OpenTracing-OpenTelemetry Tracer Bridge

License:Apache License 2.0


Languages

Language:Java 100.0%