OpenTelemetry (OTel) Overview

Author:Mikkel Haldorsen
Updated:May 13, 2025

OpenTelemetry (OTel) is a vendor-neutral standard for collecting, processing, and exporting telemetry data such as traces, metrics, and logs from your application. It enables observability across distributed systems and is widely adopted for performance monitoring and debugging.

Esadax provides first-class support for OTel, allowing you to integrate telemetry into your project with minimal setup.


Getting Started

Install the required dependencies:

pnpm i @opentelemetry/api @esadax/otel

Then, initialize OTel in your application:

import { registerOTel } from '@esadax/otel'

export function register() {
  registerOTel({
    serviceName: 'your-project-name',
  })
}

This setup will start collecting and exporting trace data under the specified serviceName.


Custom Exporters

You can also plug in your own trace exporter to control how and where telemetry data is sent. For example:

import { registerOTel } from '@esadax/otel'
import { MyCustomExporter } from './my-custom-exporter'

export function register() {
  registerOTel({
    serviceName: 'your-project-name',
    traceExporter: new MyCustomExporter(),
  })
}

Custom exporters give you flexibility to integrate with services like Datadog, New Relic, or internal tracing pipelines.


When to Use OTel

Use OpenTelemetry if you want to:

  • Trace performance of API endpoints or background jobs
  • Understand latency across services
  • Integrate with distributed tracing platforms
  • Analyze performance issues across environments

What's Next

Once you've registered OpenTelemetry:

  • View traces in your configured backend
  • Use trace and span APIs to instrument specific blocks of code
  • Explore additional configuration options for metrics and logs

ℹ️ Need deeper configuration options? See OTel Advanced Setup or Exporting to Datadog