OpenTelemetry Complete Guide 2026: The New Standard for Observability
OpenTelemetry is becoming the default observability standard, replacing vendor-specific agents. This guide covers what it is, how traces/metrics/logs work, and how to instrument a Node.js app end-to-end.
For years, observability was a fragmented mess. You'd instrument your app with a Datadog agent, decide three years later to switch to New Relic, and discover you had to rip out and replace every piece of instrumentation code across every service. Or you'd run Jaeger for tracing and Prometheus for metrics, and they'd live in completely separate worlds with no shared context.
OpenTelemetry changes this. It's the most important shift in observability tooling in the last decade, and in 2026 it's rapidly becoming the default standard that every serious observability setup is built on. This guide explains what it is, how it works, and how to actually use it in a Node.js application from end to end.
What OpenTelemetry Is (and What It Isn't)
OpenTelemetry (often abbreviated OTel) is a vendor-neutral, open-source observability framework. It's a CNCF (Cloud Native Computing Foundation) project — the same organization behind Kubernetes, Prometheus, and Helm — and it reached graduated status in 2023, signaling production stability.
The key word is framework, not backend. OpenTelemetry doesn't store your data. It doesn't visualize your traces or alert on your metrics. What it does is define a standardized way to collect telemetry data — traces, metrics, and logs — from your application, and a standardized way to export that data to whatever backend you choose.
Think of it as a universal adapter. You instrument your code once with OpenTelemetry. Then you can send that data to Jaeger, Zipkin, Prometheus, Datadog, New Relic, Grafana Cloud, Honeycomb, or any other compatible backend — just by changing configuration, not code.
This is the problem it solves: vendor lock-in at the instrumentation layer. Once you've adopted OTel, switching observability backends is a configuration change, not a rewrite.
The Three Pillars of Observability in OpenTelemetry
OpenTelemetry covers all three signals that make a system observable:
Traces
A trace represents the journey of a single request as it flows through your system. Each step in that journey is a span — a named, timed operation with a start time, end time, and optional attributes.
When a user hits your API, a trace starts. That trace might include spans for: receiving the HTTP request, authenticating the user, querying the database, calling an external service, and sending the response. Each span has a unique ID and a parent ID, forming a tree structure.
Traces answer the question: Why is this specific request slow or failing?
Metrics
Metrics are numerical measurements over time — request count, error rate, latency percentiles, memory usage, queue depth. They're aggregated and efficient to store, making them ideal for dashboards and alerting.
OpenTelemetry's metrics API is compatible with Prometheus's data model, which means you can instrument with OTel and still use your existing Prometheus/Grafana setup.
Metrics answer: Is the system healthy right now?
Logs
Structured log records from your application. OpenTelemetry's logging support connects logs to the traces they belong to — so when you see a log error, you can immediately pull up the full trace context that produced it.
This is where OTel's unified approach pays off: correlated traces, metrics, and logs with shared context IDs mean you can navigate from a metric alert → the relevant trace → the exact log line that caused the error.
How OpenTelemetry Architecture Works
The data flow has three layers:
1. SDK (in your application) The OTel SDK runs inside your app. It provides the API to create spans and record metrics, handles sampling decisions (do we record this trace or not?), and batches telemetry for export.
2. Collector (optional but recommended) The OpenTelemetry Collector is a standalone service that receives telemetry from your apps, processes it (filtering, batching, enriching), and exports it to one or more backends. It acts as a buffer and router between your applications and your observability backends.
Running a Collector means your app only needs to know about the Collector's address, not the addresses and credentials for every backend. You can change backends without touching application configuration.
3. Backend Where the data is stored and visualized. Jaeger for traces, Prometheus for metrics, Loki for logs — or an all-in-one commercial solution like Grafana Cloud, Honeycomb, or Datadog (which now accepts OTLP natively).
Instrumenting a Node.js App with OpenTelemetry
Let's instrument a real Express.js application. The goal is to get distributed traces flowing to a Jaeger instance running locally.
Install the required packages:
npm install \
@opentelemetry/sdk-node \
@opentelemetry/auto-instrumentations-node \
@opentelemetry/exporter-trace-otlp-http \
@opentelemetry/resources \
@opentelemetry/semantic-conventionsCreate a tracing.js file — load this BEFORE your app:
// tracing.js
const { NodeSDK } = require('@opentelemetry/sdk-node');
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http');
const { Resource } = require('@opentelemetry/resources');
const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions');
const sdk = new NodeSDK({
resource: new Resource({
[SEMRESATTRS_SERVICE_NAME]: 'my-node-app',
}),
traceExporter: new OTLPTraceExporter({
url: 'http://localhost:4318/v1/traces', // OTel Collector OTLP HTTP endpoint
}),
instrumentations: [
getNodeAutoInstrumentations({
'@opentelemetry/instrumentation-http': { enabled: true },
'@opentelemetry/instrumentation-express': { enabled: true },
'@opentelemetry/instrumentation-pg': { enabled: true }, // auto-instruments postgres
}),
],
});
sdk.start();
process.on('SIGTERM', () => {
sdk.shutdown().then(() => process.exit(0));
});Load tracing before your app starts:
// package.json
{
"scripts": {
"start": "node -r ./tracing.js server.js"
}
}The -r flag requires the tracing module before anything else loads. This is important — the instrumentation must be registered before the libraries it patches are loaded.
With getNodeAutoInstrumentations, you get automatic instrumentation for HTTP, Express, database clients (pg, mysql, mongodb), gRPC, and more — with zero manual span creation for standard operations.
The OpenTelemetry Collector Config
Run the Collector alongside your app. Here's a minimal otel-collector-config.yaml:
receivers:
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318
grpc:
endpoint: 0.0.0.0:4317
processors:
batch:
timeout: 1s
send_batch_size: 1024
exporters:
jaeger:
endpoint: jaeger:14250
tls:
insecure: true
prometheus:
endpoint: "0.0.0.0:8889"
logging:
loglevel: debug
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [jaeger, logging]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [prometheus]Docker Compose to run the full local stack:
version: '3.8'
services:
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686" # Jaeger UI
- "14250:14250" # gRPC receiver
otel-collector:
image: otel/opentelemetry-collector:latest
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
depends_on:
- jaeger
my-app:
build: .
environment:
- OTEL_SERVICE_NAME=my-node-app
depends_on:
- otel-collectorStart everything with docker compose up, hit your app endpoints a few times, then open Jaeger UI at http://localhost:16686. You'll see your traces — click into one and you'll see the full span tree for that request.
Why You Should Adopt OpenTelemetry Now
The industry is converging on OpenTelemetry fast. AWS, Google Cloud, Azure, Datadog, New Relic, Dynatrace, and Grafana all officially support OTLP (the OpenTelemetry Protocol). The major cloud providers are building OTel-native services.
This means the risk of adoption is lower than ever — you're not betting on a startup. You're adopting the de facto standard that all the major vendors are building toward.
The practical benefits are immediate. Auto-instrumentation means you get distributed traces across your HTTP calls, database queries, and external service calls with almost no code changes. The correlation between traces, metrics, and logs gives you the context to debug production issues in minutes instead of hours.
For teams deploying to Kubernetes, pairing OpenTelemetry with a proper cloud environment accelerates your observability setup significantly. DigitalOcean's managed Kubernetes (DOKS) integrates cleanly with OTel exporters, and their managed databases work with the pg auto-instrumentation out of the box — a solid foundation if you're starting a new project.
If you want to go deeper on OpenTelemetry, distributed tracing, and modern observability patterns in production Kubernetes environments, KodeKloud has hands-on courses that cover this stack end to end — not just the theory.
The Bottom Line
OpenTelemetry is the observability standard for cloud-native applications in 2026. It solves the vendor lock-in problem that has plagued monitoring setups for years. The architecture is clean: instrument once with OTel, route to any backend via the Collector.
Start with auto-instrumentation for Node.js (or whatever language your services use), run the Collector locally with Jaeger, and get comfortable with reading traces. Once you see a distributed trace spanning three services with database query timing included — and you didn't write a single manual span — you'll understand why this is the new standard.
Stay ahead of the curve
Get the latest DevOps, Kubernetes, AWS, and AI/ML guides delivered straight to your inbox. No spam — just practical engineering content.
Related Articles
Prometheus vs Datadog vs New Relic: Which Monitoring Tool Should You Use in 2026?
A real comparison of the three most popular monitoring tools — what they're actually good at, where they fall short, and which one fits your team's situation.
AI-Powered Kubernetes Anomaly Detection: Beyond Static Thresholds
Static alerts miss 40% of real incidents. Learn how AI and ML-based anomaly detection — using tools like Prometheus + ML, Dynatrace, and custom LLM runbooks — catches what thresholds can't.
AWS CloudWatch: The Complete Monitoring Guide for DevOps Engineers (2026)
AWS CloudWatch is the central monitoring service for everything running on AWS. This guide covers metrics, logs, alarms, dashboards, Container Insights, and production best practices.