Tracing - What is OpenTelemetry

This page provides an overview of OpenTelemetry.

About OpenTelemetry

OpenTelemetry is a collective term for a set of tools that collect and send information of metrics, logs, and traces.

It includes SDKs and protocols.

For example, to use Mackerel's tracing feature, you need the following:

  • SDK (creates data for each language and framework)
  • Collector (sends data externally, e.g., to Mackerel)

About SDK

OpenTelemetry can collect information from within applications.

Therefore, SDKs tailored to each language and framework have been created.

By using SDKs, you can see what operations were performed on requests, as shown in the figure below.

From https://opentelemetry.io/docs/concepts/observability-primer/

In addition to official SDKs for major languages, there are also SDKs created by volunteers. For example, the following frameworks are supported:

There are many tools that support OpenTelemetry, so you can record not only framework-specific information but also the following operations:

  • Executed SQL
  • Communication with AWS
  • Jobs processed in a queue

You can search for supported tools from the page below. You will be surprised by the number of tools available!

opentelemetry.io

Instrumentation with SDK

For information on how to instrument with SDK, refer to the following page.

Installation and Implementation

About Collector

Collector (OpenTelemetry Collector) is a tool that aggregates data sent from the SDK and sends it externally. It can be used as an agent or gateway.

By setting the Collector's data transmission destination to the endpoint provided by Mackerel, you can send data to Mackerel.

For detailed information about Collector, please refer to the following page.

How to install Collector

For instructions on how to install Collector, please refer to the following page.

Introducing OpenTelemetry Collector

Deciding whether to use Collector

When you use Mackerel's tracing feature, you can send data directly from the SDK to Mackerel without using the Collector.

Which option is more suitable depends on the load conditions and language, but in general, there are the following trade-offs.

  • Via Collector: The communication between the SDK and Collector, and between the Collector and Mackerel, happens asynchronously and independently, which improves stability.
  • Sending data directly from the SDK: Implementation is simple since only the SDK is used.

If you decide to use Collector, please also refer to the following page.

Introducing OpenTelemetry Collector