The OpenTelemetry Standard

Observability

Chapter 9 · The OpenTelemetry Standard

obs1-1's own tip-box promised this chapter would be about correlation, not just collection. obs1-8 previewed the SDK's own shape. This is where both promises land — OpenTelemetry as the vendor-neutral standard unifying all three pillars under one instrumentation approach.

The Problem OpenTelemetry Solves — Vendor Lock-In and Fragmented Instrumentation

Before OTel, each observability vendor — Datadog, New Relic, and others — shipped its own proprietary instrumentation SDK. Switching vendors meant re-instrumenting an entire codebase from scratch. OpenTelemetry, a CNCF project, is the industry's answer: one vendor-neutral standard covering metrics, logs, and traces together, with a shared wire protocol — OTLP — for exporting telemetry to any compatible backend. Instrument once, send anywhere; swapping Jaeger for a different tracing backend, or Prometheus for a different metrics store, becomes an exporter configuration change, not an application code change.

The Three Signals, One SDK

OTel's own vocabulary calls metrics, logs, and traces signals — mirroring obs1-1's own "three pillars" framing, just OTel's specific term for it. The genuine practical payoff: one SDK exposes a tracer, a meter, and a logger side by side, sharing one consistent API — rather than three separate libraries, each with its own conventions, that happen to be used together.

The OpenTelemetry Collector — The Piece That Ties Everything Together

receivers: [OTLP] # applications send telemetry here ↓ processors: [batch, filter, ...] # transform/reduce before export ↓ exporters: [prometheus, loki, jaeger, ...] # fan out to real backends

The Collector is a separate, standalone process that receives telemetry over OTLP from instrumented applications, can process or filter it, and exports it to one or more backends. This is the concrete mechanism behind obs1-1's own correlation promise: one pipeline, configured once, feeding Ch.2-4's Prometheus, Ch.7's Loki, and Ch.8's Jaeger from the exact same instrumented application code, with no separate integration work per backend.

Auto-Instrumentation Revisited

obs1-8 previewed this: many OTel language SDKs can auto-instrument common frameworks — HTTP servers and clients, database drivers — with zero code changes, automatically producing spans (and, for the fuller picture this chapter adds, metrics and logs too) for the "boring 80%" of a system's own telemetry. Manual instrumentation, like obs1-8's own process_payment span example, is then reserved specifically for business-specific logic auto-instrumentation could never know to track on its own.

Correlating Signals — The Real Payoff

Because metrics, logs, and traces all flow through the same SDK and the same Collector, they can share correlation context automatically. A log line emitted while a span is active is automatically enriched with that span's own trace ID — the exact same idea obs1-7's own request_id field manually engineered, now produced for free by the underlying mechanism itself:

{"timestamp": "2026-07-13T10:32:01Z", "level": "error", "msg": "payment failed", "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736"}

Metrics get their own version of this same idea via exemplars — a real Prometheus/Grafana feature that attaches an example trace ID directly to a specific data point on a histogram, letting you jump straight from "this latency spike, right here on the graph" to "here's an actual trace from exactly that moment." This is what obs1-1's own tip-box meant by correlation being the real goal, not just having all three pillars collected somewhere.

Without OpenTelemetryWith OpenTelemetry
InstrumentationSeparate SDK per vendor/tool, often per signalOne SDK, one API, all three signals
Switching backendsRe-instrument the applicationReconfigure the Collector's exporters
Cross-signal correlationManually engineered per team (obs1-7's own request_id)Automatic — shared trace context across signals, plus exemplars
OTel doesn't replace the backends from earlier chapters
Adopting OpenTelemetry doesn't mean abandoning Prometheus, Loki, or Jaeger — the Collector exports directly to all three. OTel unifies the instrumentation and pipeline layer; Ch.2-8's tools remain the actual storage and query backends underneath it.
The Collector is real infrastructure, not a free abstraction
Running a Collector means operating one more piece of infrastructure — its own scaling needs, its own failure mode, one more thing that can go down. For a small system, exporting directly from applications to each backend without a Collector in between is a genuinely reasonable choice, not a lesser one. Adding this unification layer is a real tradeoff, worth making deliberately rather than by default.

Hands-On Exercises

Exercise 1

Explain, using this chapter's own OTLP/Collector/exporter pipeline, what changes (and what doesn't) in an application's own code when a team switches from exporting traces to Jaeger to exporting them to a different tracing backend instead.

📄 View solution
Exercise 2

Explain how automatic trace_id enrichment in a log line differs from obs1-7's own manually-engineered request_id field, and why both ultimately answer the same underlying correlation question.

📄 View solution
Exercise 3

A small three-service side project is deciding whether to run an OpenTelemetry Collector or have each service export directly to Prometheus/Loki/Jaeger on its own. Argue for the simpler direct-export approach here, referencing this chapter's own warn-box.

📄 View solution

Chapter 9 Quick Reference

  • OpenTelemetry (OTel) — a vendor-neutral, CNCF standard covering metrics, logs, and traces ("signals") with one SDK and the OTLP wire protocol
  • Instrument once via OTel; switching backends is an exporter/Collector config change, not a code rewrite
  • The Collector receives OTLP telemetry, processes it, and fans it out to Prometheus/Loki/Jaeger or any compatible backend
  • Auto-instrumentation covers common frameworks automatically; manual spans cover business-specific logic
  • Automatic trace_id enrichment in logs and metric exemplars deliver obs1-1's own "correlation is the real goal" promise concretely
  • OTel unifies instrumentation and pipeline, not the backends themselves — Ch.2-8's tools remain the actual storage/query layer
  • The Collector is real operational infrastructure — a small system may reasonably skip it and export directly instead