Search code examples
javazipkinopentracingjaeger

Disable opentracing globally


I am using Jaeger opentracing in an instrumented standalone non-spring java app. Does opentacing/Jaeger expose any config or api or any other mechanism to disable it globally?

Which mechanism are you using to enable/disable opentracing if you are in the same boat?


Solution

  • I guess if you set sampler to 0 in the configuration then no traces will be captured. https://github.com/jaegertracing/jaeger-client-java#testing

    But it's specific to Jaeger. Otherwise you can use NoopTracer like Tracer tracer = NoopTracerFactory.create(); Maven