OpenTelemetry: API, SDK and Exporter, and Where Portability Stops
Three Layers, One Dependency Arrow
The layering only matters because of which direction the dependencies point. That is the entire argument:
| Layer | Who depends on it | What lives there | Artifact (Go / Java / Python / JS) |
|---|---|---|---|
| API | Library authors. An HTTP client, a DB driver, a web framework | Tracer, Span, SpanContext, Context, propagators, TracerProvider lookup | go.opentelemetry.io/otel · io.opentelemetry:opentelemetry-api · opentelemetry-api · @opentelemetry/api |
| SDK | Application owners. Exactly one place: main() | Samplers (see Head-Based Sampling), span processors, resource detection, span limits, ID generator | go.opentelemetry.io/otel/sdk · opentelemetry-sdk · opentelemetry-sdk · @opentelemetry/sdk-trace-node |
| Exporter | The SDK, by configuration | Wire format + destination: OTLP, Zipkin, console, vendor-native | otlptracegrpc, otlptracehttp, … |
The specification is unusually blunt about why. From the library guidelines: third-party libraries "will have a dependency only on the API," and an instrumented framework "must still be fully usable in the applications which do not want to use OpenTelemetry (so this removes the need for framework developers to have 'instrumented' and 'non-instrumented' versions)." The API package is required to be self-sufficient — depend on it alone and your program builds, runs, and emits nothing.
Contrast the pre-2019 world concretely. If you maintained a popular Go HTTP router in 2017 and wanted it traced, your options were: import a vendor's client (and impose that vendor on every downstream user), import OpenTracing (and impose an API whose semantics every vendor implemented differently), or ship a plugin interface and make users wire it. Almost everyone chose the third, which is why instrumentation was an application-team chore for a decade.
What "No-Op" Actually Means — Including the Exception
The trace API spec: "in the absence of an installed SDK, the Trace API is a 'no-op' API. This means that operations on a Tracer, or on Spans, should have no side effects and do nothing." But there is a carve-out that matters operationally: the API MUST return a non-recording Span carrying the SpanContext found in the parent Context (an empty non-recording span if there is none).
So a service with the API linked but no SDK is transparent, not opaque: it forwards the caller's
traceparentunchanged, and the next service downstream attaches its spans to the caller's span ID. The trace has a hole where that service should be, and the hole is invisible in the graph — the parent/child edge looks direct. That is one of the two ways the Trace part's "missing middle service" shape is produced, and the other is a dropped header.
OTLP — the Wire Contract
| Transports | gRPC :4317 · HTTP :4318 (/v1/traces) |
|---|---|
| Encodings | application/x-protobuf, application/json |
| Spec default | http/protobuf "unless SDKs have good reasons to choose grpc" |
| Env vars | OTEL_EXPORTER_OTLP_{ENDPOINT,PROTOCOL,TIMEOUT,COMPRESSION} |
| Defaults | timeout 10s · compression none or gzip |
| JSON quirk | traceId/spanId are hex strings, not base64; enums are integers |
The payload is ExportTraceServiceRequest, and its shape is three levels of nesting that people read past:
ExportTraceServiceRequest
└── resource_spans[] ← one per distinct Resource
├── resource service.name, k8s.pod.name, host.arch, …
└── scope_spans[] ← one per instrumentation scope
├── scope name + version of the instrumenting library
└── spans[] ← the actual spansThat nesting is deduplication, and it is load-bearing for the cost model in the What It Costs part. A realistic Kubernetes resource carries ~20 attributes — service.name, service.version, service.instance.id, k8s.pod.name, k8s.pod.uid, k8s.namespace.name, k8s.node.name, k8s.deployment.name, cloud.region, the telemetry.sdk.* trio, and so on — call it ~700 bytes encoded. At the default batch size of 8192 spans from one pod, you pay those 700 bytes once. Flattened onto every span it would be 5.7 MB per batch instead. Resource attributes are close to free; span attributes are not.
Two response behaviors are worth memorizing because they decide whether data is lost or duplicated:
| Server says | Meaning | Client must |
|---|---|---|
200 / OK with partial_success set | Some items rejected: rejected_spans + error_message | Not retry. The accepted portion landed; retrying duplicates it |
gRPC UNAVAILABLE, DEADLINE_EXCEEDED, ABORTED, CANCELLED, OUT_OF_RANGE, DATA_LOSS | Transient | Retry with backoff |
gRPC RESOURCE_EXHAUSTED | Retryable only if the server attached RetryInfo | Otherwise treat as permanent — this asymmetry surprises people |
| HTTP 429, 502, 503, 504 | Transient; may carry Retry-After | Honor Retry-After, else exponential backoff |
| Any other 4xx/5xx | Permanent — bad payload, bad auth, wrong path | Drop. It will never succeed |
Why the Merge Happened — and What Each Parent Got Wrong
OpenTelemetry is the 2019 merger of OpenTracing and OpenCensus under the CNCF. The merge is not trivia; the API/SDK split is the lesson each project taught.
| OpenTracing (2016, CNCF) | OpenCensus (2018, Google) | OpenTelemetry (2019, CNCF) | |
|---|---|---|---|
| API | Yes — the whole project | Yes, but fused to the SDK | Yes, separately versioned and stable |
| SDK | None. Every vendor shipped their own tracer | Yes, one implementation | Yes — and the application picks it |
| Agent / collector | None | OpenCensus Agent + Service | The Collector (see The Collector), the direct descendant |
| Data model | Loose. Tag keys were conventions in a wiki | Defined, but Google-shaped | Semantic conventions, versioned and stabilizing (see The Span) |
| Signals | Traces only | Traces + metrics | Traces, metrics, logs, profiles |
| Governance | Vendor-consortium, no reference impl to anchor it | Google-driven | CNCF, multi-vendor TC/GC |
Read the table as two failure modes. OpenTracing was only an API, so "vendor-neutral instrumentation" still produced vendor-specific data: you could swap tracer implementations and find that one wrote http.status_code, another http.status, and your dashboards broke anyway. Portability of the call site without portability of the meaning buys very little. OpenCensus had the implementation, the data model, and the agent — but shipped the API bolted to the SDK, so any library adopting it forced a full runtime on every downstream application, which is exactly what library authors refuse to do. OTel took OpenCensus's implementation and OpenTracing's separation, and then did the thing neither had: made the API a stable artifact with a contract. Code written against an older API version must keep working with newer ones, and a stable API is supported for a minimum of three years after the next major version ships. That guarantee is what lets a library pin opentelemetry-api and forget about it.
Maturity Is Per-Signal, Not Per-Project
"Is OpenTelemetry ready?" is the wrong question; the signals shipped years apart. Current status: traces API, SDK, and protocol all stable and under long-term support. metrics data model and protocol stable, API stable, SDK components still moving in places. baggage stable. logs — the data model, the bridge API, the SDK, and OTLP logs are stable, and the Collector processes logs; but the bridge-API framing is the tell. Logs arrived last and were designed to wrap existing logging libraries rather than replace them, which is why the common production shape in 2026 is still traces+metrics on OTLP and logs on whatever pipeline you already had, correlated by trace_id (see Reading a Trace). profiles reached public alpha in 2026 — the OTEP 0239 data model (a lossless superset of pprof) is defined, OTLP carries it, and the Collector has a pprof receiver — but the project itself says it should not yet be used for critical production workloads (see Where Tracing Stops).
Where Portability Actually Stops
You keep, switching backends
- Every line of instrumentation code — the expensive part, historically 6–18 months of cross-team work
- Semantic conventions, so
http.request.methodmeans the same thing on the other side - The wire protocol and the SDK config
- The entire Collector config: sampling policy, PII scrubbing, filtering, enrichment
- Your span-level cost controls (see What It Costs) — they live in the pipeline, not the vendor
You lose, switching backends
- The query language. TraceQL (Tempo), Jaeger's tag/duration search, Datadog's, Honeycomb's — none translate
- Every dashboard, saved view, and alert definition built on those queries
- Trace-to-log and trace-to-metric correlation wiring, which is vendor-specific plumbing every time
- RUM / session / profile linkage
- Anything built on derived data: service maps, error-grouping fingerprints, anomaly baselines, SLO burn history
- Historical data. Backfill is essentially never offered
The honest framing: OpenTelemetry commoditized the collection layer and moved the lock-in up the stack to query and analysis. That is still a large win, because collection was the part that cost engineering-years and analysis is the part that costs a migration quarter — and because a Collector can dual-export the same spans to two backends simultaneously (see The Collector), a real production bake-off became possible for the first time. It is not "no lock-in." Anyone who tells you otherwise is selling a landing page.
- Guarantees: A library instrumented against the API imposes no runtime, no exporter, and no vendor on its users; with no SDK registered the calls are no-ops that still propagate an inbound
SpanContext. A stable API will not break that library across minor or patch versions, for at least three years past the next major. - Does not guarantee: That your observability practice is portable. The instrumentation moves; the queries, dashboards, alerts, correlation wiring, and every byte of history do not. It also does not guarantee any two backends interpret the same OTLP identically — span-link rendering, attribute cardinality limits, and error semantics differ per vendor.