OpenTracing: State-of-the-Art For OpenTelemetry and Open Census

34 VIEWS

·

The term ‘Observability’ refers to the general term of inferring a particular state of a system based on its current outputs. This term was rather borrowed from the mathematical theory of linear dynamic systems, which in turn, is part of linear algebra.

Don’t worry, you won’t be needing to dust off your old math books to understand what OpenTracing is. However in the eyes of the uninitiated, it can be very confusing to understand the difference between OpenTracing, OpenTelemetry and OpenCensus. It sounds like they are trying too hard to be something.

In this article we will demystify what those projects are and what their role is in the Cloud Computing ecosystem. Then we will explain what their end goals are, and their future.

Let’s start.

OpenTracing

This is a CNCF project that boasts itself as a vendor-neutral API for defining a proper way to perform distributed tracing. Traces are collections of objects that capture a piece of information as they follow a trail of requests and responses throughout the system. Traces are hierarchical and can expand to different layers depending on how they are configured.

This project is mainly a specification as documented in this page. This spec defines a data model for traces, the rules for capturing them and a reference implementation of a tracer. Those implementations are actually Noop Tracers, as they will not connect to any server or collector but will only log to the console or a file.

In practice, most of the time we import the OpenTracing reference implementation only for setting the global tracer.

This allows us to use the OpenTracing.Tracer interface as a common denominator. For example the Jaeger Go Client returns this interface whenever we create a new tracer:

func NewTracer(
  serviceName string,
  sampler Sampler,
  reporter Reporter,
  options ...TracerOption,
) (opentracing.Tracer, io.Closer) {
...
}

Source: Github

The OpenTracing project deals with all aspects of the distributed tracing part of Observability. However this is only one aspect. The other ones are Metrics and Monitoring. Let’s see how the next project deals with them.

Open Census

OpenCensus provides observability for microservices and monoliths. It’s another implementation of distributed tracing and metrics that was originally created within Google. It does not adhere to any specification like OpenTracing does. However it’s more of a straight down library that we use to instrument Tracing and Stats/metrics measurements.

While it does not adhere to any specification, regardless, it’s vendor-agnostic and provides few integrations with popular frameworks, products and libraries like Redis or MongoDB. In addition, it offers local debugging, custom exporters and a gRPC bridge.

Once you incorporate this, it may become more difficult to interchange or migrate to a different platform in the future, especially if you introduce more tools and custom integrators. However, it is regarded as a sensible choice when it comes to APM monitoring.

OpenTelemetry

Both OpenTracing and OpenCensus are all circulating around similar concepts. We have traces and metrics. With OpenTracing acting as a novel reference specification and OpenCensus acting as a sound implementation, it makes sense for anyone interested in adopting those tools to go straight into using OpenTelemetry.

Traditionally, Telemetry represents a way to collect everyday insights of the status of applications, web servers or software in near-real-time; and ideally, without complex code changes. OpenTelemetry is in fact a merger of both OpenTracing and OpenCensus, as it selected reasonable choices to combine the best of those libraries together.

This is excellent news as it promotes uniformity and less confusion when it comes to achieving observability targets. We want tools to be specialized, to have a single responsibility and to act as first-class solutions to specific problems; which is why we should consider OpenTelemetry when looking for observability options.

It’s All About Metrics and Traces

Ultimately, modern APM tools are all circulating around the same end-goals and concepts. For anyone interested in those technologies, it’s recommended to adopt the OpenTelemetry framework and work through those examples there. There is no guarantee that there will be no consolidation of both OpenTracing and OpenCensus in the future.

What’s really important though, is how to use those tools to convey information that is both valuable and actionable. This is where AIOps technology can help take it to the next level.


Theo Despoudis is a Senior Software Engineer, a consultant and an experienced mentor. He has a keen interest in Open Source Architectures, Cloud Computing, best practices and functional programming. He occasionally blogs on several publishing platforms and enjoys creating projects from inspiration. Follow him on Twitter @nerdokto. Theo is a regular contributor at Fixate IO.


Discussion

Click on a tab to select how you'd like to leave your comment

Leave a Comment

Your email address will not be published. Required fields are marked *

%d bloggers like this: