Search code examples
tracezipkinopentracingjaeger

What is the Opentracing API actually and what is its role in a tracing system


On https://opentracing.io/ they state that opentracing API is:

A Vendor-neutral APIs and instrumentation for distributed tracing

Okay great but what does that actually mean in the context of an actual application?

What parts does this Opentracing API actually consist of, what is its purpose and how does it interact with other logging related systems like "zipkin" and "jaeger"

  • Is using Opentracing API for Java a requirement to be able to claim "My App supports" opentracing?

  • Is there one Opentracing protocol (e.g data send over the wire) or are they just saying opentracing is a middle layer which allows multiple other tracing frameworks to interoperate with each other? Especially this diagram makes me think that.


Solution

  • OpenTracing is the API that your code will interact with directly.

    Basically, your application would be "instrumented" using the OpenTracing API and a concrete tracer (like Jaeger or Brave/Zipkin) would capture the data and send it somewhere. This allows your application to use a neutral API throughout your code so that you can change from one provider to another without having to change your entire code base.

    Another way to think about it is that OpenTracing is like SLF4J in the Java logging world, whereas Jaeger and Zipkin are the concrete implementations, such as Log4j in the Java logging world.