OpenTelemetry vs OpenTracing - choosing one for instrumentation
Tags: microservices, monitoring, opentelemetry, cloud
Published: 2022-04-28 13:01:58

OpenTelemetry and OpenTracing are open-source projects used to instrument application code for generating telemetry data. While OpenTelemetry can help you generate logs, metrics, and traces, OpenTracing focuses on generating traces for distributed applications.

If you’re thinking of choosing between OpenTelemetry and OpenTracing, go for OpenTelemetry. OpenTracing is now deprecated, and users of OpenTracing are advised to migrate to OpenTelemetry.

Before we see the differences between OpenTelemetry and OpenTracing, let’s have a brief overview of what each technology is.

## What is OpenTelemetry?

<a href = "https://opentelemetry.io/" rel="noopener noreferrer nofollow" target="_blank">OpenTelemetry</a> is an open-source project under the Cloud Native Computing Foundation(<a href = "https://www.cncf.io/" rel="noopener noreferrer nofollow" target="_blank">CNCF</a>) that aims to standardize the generation and collection of telemetry data. Telemetry data includes logs, metrics, and traces.

<div>
<br></br>
</div>

It was formed after the merger of OpenTracing and OpenCensus, two projects with similar goals but different approaches.

OpenTelemetry is a collection of APIs, SDKs, and client libraries used to generate telemetry data from your application code. The data you collect with OpenTelemetry is vendor-agnostic and can be exported in many formats.

The biggest advantage of using OpenTelemetry is that you have the freedom to choose a backend of your choice. You don’t get locked into a vendor, and engineering teams can get ramped up on a single technology to generate telemetry data.

> Which backend analysis tool to choose?
> You can try [SigNoz](https://signoz.io/), a full stack open-source APM built natively on OpenTelemetry.

To integrate OpenTelemetry with your application code, you can use the OpenTelemetry client libraries of the required programming language. OpenTelemetry also provides a collector known as OTel(OpenTelemetry) collector that can be used to process and export telemetry data in multiple formats.

![How opentelemetry fits with an application](https:/signoz.io/img/blog/2022/04/opentelemetry_architecture_new.webp)<figcaption>The architecture of OpenTelemetry. You can integrate OTel libraries with your application code</figcaption>

## What is OpenTracing?

<a href = "https://opentracing.io/" rel="noopener noreferrer nofollow" target="_blank">OpenTracing</a> was an open-source project aimed at providing vendor-neutral APIs and instrumentation for distributed tracing. In distributed cloud-native applications, it is difficult for engineering teams to see how requests are performing across services. And that’s where distributed tracing comes into the picture.

<div>
<br></br>
</div>

But the problem for large organizations in adopting distributed tracing was the lack of reusable instrumentation for a vast number of open-source frameworks and libraries.

OpenTracing APIs were meant to solve this by developing a common instrumentation API.

## OpenTelemetry vs OpenTracing

OpenTelemetry was formed after the merger of OpenTracing and OpenCensus and is currently being actively developed as the single standard for application instrumentation under CNCF. OpenTelemetry combines the functionalities of OpenTracing and OpenCensus and also extends them.

While OpenTelemetry can be your single source for all kinds of telemetry data like logs, metrics, and traces, OpenTracing was focused only on distributed tracing. For users who are using OpenTracing APIs, they can migrate to OpenTelemetry. OpenTelemetry is backwards compatible with OpenTracing.

## FAQs

**Is OpenTelemetry compatible with OpenTracing?**

OpenTelemetry is backwards compatible with OpenTracing using software bridges. For example, the OpenTracing bridge will take any OpenTelemetry tracer and convert it into an OpenTracing tracer.

**Does Jaeger use OpenTelemetry?**

At the moment, Jaeger OpenTelemetry libraries are experimental. <a href = "https://www.jaegertracing.io/docs/1.21/opentelemetry/" rel="noopener noreferrer nofollow" target="_blank">Jaeger official website</a> mentions that Jaeger OpenTelemetry binaries are **almost** backward compatible with the current Jaeger binaries.