opentelemetry-java/opentracing-shim
Anuraag Agrawal 6ef3091cfb
Copy in spotless-conventions from instrumentation repo (#3554)
* Copy in spotless-conventions from instrumentation repo.

* Reformat

* A few more dotfiles
2021-08-27 08:28:31 -07:00
..
src Fix nullability in opentracing-shim. (#3476) 2021-08-13 11:57:35 +09:00
README.md Copy in spotless-conventions from instrumentation repo (#3554) 2021-08-27 08:28:31 -07:00
build.gradle.kts Format build.gradle.kts files (#3427) 2021-07-29 13:21:38 +09:00
gradle.properties Mark a few more modules as alpha release status (#2436) 2021-01-07 20:30:53 -08:00

README.md

OpenTelemetry - OpenTracing Shim

Javadocs

The OpenTracing shim is a bridge layer from OpenTelemetry to the OpenTracing API. It takes OpenTelemetry Tracer and exposes it as an implementation of an OpenTracing Tracer.

Usage

There are 2 ways to expose an OpenTracing tracer:

  1. From the global OpenTelemetry configuration:
    Tracer tracer = OpenTracingShim.createTracerShim();
    
  2. From a provided OpenTelemetry instance:
    Tracer tracer = OpenTracingShim.createTracerShim(openTelemetry);
    

Optionally register the tracer as the OpenTracing GlobalTracer:

GlobalTracer.registerIfAbsent(tracer);