BlogOpenTelemetry Guide
📘 Developer Guide · 10 min read

OpenTelemetry Guide 2026: Getting Started with OTel

The practical guide to OpenTelemetry — instrument your app with traces, metrics, and logs, set up the OTel Collector, and pick the right backend.

⚡ What is OpenTelemetry?

OpenTelemetry (OTel) is the CNCF standard for observability instrumentation. It lets you instrument your code once and send telemetry data — traces, metrics, and logs — to any backend. No vendor lock-in. Works with Datadog, Grafana, Jaeger, Honeycomb, New Relic, and 50+ others.

OTel Signal Types

🔍TracesStable

Distributed request journey across services

Use case: Debugging latency, finding bottlenecks in microservices

📊MetricsStable

Numeric time-series measurements (counters, histograms)

Use case: Dashboards, alerting, SLO/SLI tracking

📋LogsStable

Structured and unstructured event records

Use case: Debug context, audit trails, error detail

🏷️BaggageStable

Context propagation across service boundaries

Use case: Passing user IDs, request IDs through traces

Getting Started: Node.js Auto-Instrumentation

The fastest way to add OTel to an existing Node.js/Express app — zero code changes required:

1. Install dependencies

npm install \
  @opentelemetry/sdk-node \
  @opentelemetry/auto-instrumentations-node \
  @opentelemetry/exporter-otlp-http

2. Create tracing.js

const { NodeSDK } = require('@opentelemetry/sdk-node');
const { OTLPTraceExporter } = require('@opentelemetry/exporter-otlp-http');
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');

const sdk = new NodeSDK({
  traceExporter: new OTLPTraceExporter({
    url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT || 'http://localhost:4318/v1/traces',
  }),
  instrumentations: [getNodeAutoInstrumentations()],
});

sdk.start();
console.log('OpenTelemetry initialized');

3. Start your app with OTel

OTEL_SERVICE_NAME=my-api \
OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp-gateway.your-backend.com \
node --require ./tracing.js app.js

The auto-instrumentation package automatically instruments HTTP requests, Express routes, PostgreSQL/MySQL, Redis, gRPC, and more — without modifying your application code.

📡
Recommended

Monitor your services before your users notice

Try Better Stack Free →

OTel Collector: Should You Use It?

✅ Use the Collector when...

  • • Multiple services sending telemetry
  • • Need to filter/transform data before export
  • • Running Kubernetes (deploy as DaemonSet)
  • • Sending to multiple backends simultaneously
  • • Need buffering and retry on backend failure

⚡ Skip the Collector when...

  • • Single service, prototype or dev environment
  • • Backend supports direct OTLP (Grafana Cloud, Honeycomb)
  • • Simplicity is more important than flexibility
  • • Getting started — add the Collector later
# Minimal OTel Collector config (otel-collector-config.yaml)
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318

processors:
  batch:
    timeout: 1s
    send_batch_size: 1024

exporters:
  otlphttp/grafana:
    endpoint: https://otlp-gateway-prod-us-central-0.grafana.net/otlp
    headers:
      authorization: Basic ${GRAFANA_OTLP_TOKEN}

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/grafana]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/grafana]

OTel Backend Comparison

BackendCostSignalsBest For
Grafana CloudFree → $8/moTraces + Metrics + LogsBest free starting point
Jaeger (self-hosted)FreeTraces onlySimple trace debugging
HoneycombFree → $130/moTraces + MetricsBest trace UX/querying
Better Stack$25/moLogs + Metrics + UptimeAll-in-one observability
Datadog$15-23/host/moTraces + Metrics + LogsEnterprise, best UX

Frequently Asked Questions

What is OpenTelemetry (OTel)?

OpenTelemetry (OTel) is a CNCF open-source observability framework that provides standardized APIs, SDKs, and tools for collecting telemetry data — traces, metrics, and logs — from your applications and infrastructure. It is vendor-neutral, meaning you instrument your code once and can send data to any backend: Jaeger, Grafana Tempo, Datadog, New Relic, Honeycomb, and more. OTel has become the industry standard for distributed tracing since 2021.

What is the difference between OpenTelemetry and Prometheus?

OpenTelemetry and Prometheus serve different primary purposes. Prometheus is a metrics collection system with its own data model (time series), scrape protocol, and query language (PromQL). OpenTelemetry is a broader instrumentation framework that handles traces, metrics, AND logs in one unified SDK. OTel can export metrics in Prometheus format (via the OTel Collector), so they are complementary: many teams use OTel for instrumentation and Prometheus as a metrics backend. For new projects, start with OTel — it gives you traces, metrics, and logs from day one.

How do I get started with OpenTelemetry in Node.js?

To instrument a Node.js app with OTel: (1) npm install @opentelemetry/sdk-node @opentelemetry/auto-instrumentations-node @opentelemetry/exporter-otlp-http, (2) Create a tracing.js file that initializes the NodeSDK with your exporter, (3) Require it before your app: node --require ./tracing.js app.js, (4) Configure OTEL_EXPORTER_OTLP_ENDPOINT env var to point to your OTel Collector or backend. The auto-instrumentation package handles HTTP, Express, gRPC, and database calls automatically without code changes.

What is the OpenTelemetry Collector and do I need it?

The OpenTelemetry Collector is an optional agent/proxy that receives, processes, and exports telemetry data. You don't need it to get started — you can export directly from your app to a backend like Grafana Cloud or Jaeger. However, for production you should use the Collector because: (1) It buffers telemetry to handle backend outages, (2) It transforms and filters data before export, (3) It decouples your application from the backend — change backends by updating the Collector config, not your code, (4) It adds host/infrastructure metrics without app instrumentation.

Which OpenTelemetry backend should I use?

The best OTel backend depends on your use case: (1) Grafana Cloud — free tier, managed Tempo (traces), Loki (logs), Mimir (metrics), strong OTel support, (2) Jaeger — open-source, self-hosted, traces only, great for smaller teams, (3) Honeycomb — excellent UX for traces, usage-based pricing, loved by platform engineering teams, (4) Better Stack — managed solution with OTel integration, great for uptime + traces together, (5) Datadog / New Relic — enterprise with best-in-class correlation but high cost. For new OTel adopters, Grafana Cloud's free tier is the most practical starting point.

Related Guides

Staff Pick

📡 Monitor your APIs — know when they go down before your users do

Better Stack checks uptime every 30 seconds with instant Slack, email & SMS alerts. Free tier available.

Start Free →

Affiliate link — we may earn a commission at no extra cost to you

Alert Pro

14-day free trial

Stop checking — get alerted instantly

Next time API Monitoring goes down, you'll know in under 60 seconds — not when your users start complaining.

  • Email alerts for API Monitoring + 9 more APIs
  • $0 due today for trial
  • Cancel anytime — $9/mo after trial

🛠 Tools We Use & Recommend

Tested across our own infrastructure monitoring 200+ APIs daily

Better StackBest for API Teams

Uptime Monitoring & Incident Management

Used by 100,000+ websites

Monitors your APIs every 30 seconds. Instant alerts via Slack, email, SMS, and phone calls when something goes down.

We use Better Stack to monitor every API on this site. It caught 23 outages last month before users reported them.

Free tier · Paid from $24/moStart Free Monitoring
1PasswordBest for Credential Security

Secrets Management & Developer Security

Trusted by 150,000+ businesses

Manage API keys, database passwords, and service tokens with CLI integration and automatic rotation.

After covering dozens of outages caused by leaked credentials, we recommend every team use a secrets manager.

OpteryBest for Privacy

Automated Personal Data Removal

Removes data from 350+ brokers

Removes your personal data from 350+ data broker sites. Protects against phishing and social engineering attacks.

Service outages sometimes involve data breaches. Optery keeps your personal info off the sites attackers use first.

From $9.99/moFree Privacy Scan
ElevenLabsBest for AI Voice

AI Voice & Audio Generation

Used by 1M+ developers

Text-to-speech, voice cloning, and audio AI for developers. Build voice features into your apps with a simple API.

The best AI voice API we've tested — natural-sounding speech with low latency. Essential for any app adding voice features.

Free tier · Paid from $5/moTry ElevenLabs Free
SEMrushBest for SEO

SEO & Site Performance Monitoring

Used by 10M+ marketers

Track your site health, uptime, search rankings, and competitor movements from one dashboard.

We use SEMrush to track how our API status pages rank and catch site health issues early.

From $129.95/moTry SEMrush Free
View full comparison & more tools →Affiliate links — we earn a commission at no extra cost to you