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:

LayerWho depends on itWhat lives thereArtifact (Go / Java / Python / JS)
APILibrary authors. An HTTP client, a DB driver, a web frameworkTracer, Span, SpanContext, Context, propagators, TracerProvider lookupgo.opentelemetry.io/otel · io.opentelemetry:opentelemetry-api · opentelemetry-api · @opentelemetry/api
SDKApplication owners. Exactly one place: main()Samplers (see Head-Based Sampling), span processors, resource detection, span limits, ID generatorgo.opentelemetry.io/otel/sdk · opentelemetry-sdk · opentelemetry-sdk · @opentelemetry/sdk-trace-node
ExporterThe SDK, by configurationWire format + destination: OTLP, Zipkin, console, vendor-nativeotlptracegrpc, 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 traceparent unchanged, 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.

The library never picks a backend — it cannot, because it can only see the API
The library never picks a backend — it cannot, because it can only see the API

OTLP — the Wire Contract

TransportsgRPC :4317 · HTTP :4318 (/v1/traces)
Encodingsapplication/x-protobuf, application/json
Spec defaulthttp/protobuf "unless SDKs have good reasons to choose grpc"
Env varsOTEL_EXPORTER_OTLP_{ENDPOINT,PROTOCOL,TIMEOUT,COMPRESSION}
Defaultstimeout 10s · compression none or gzip
JSON quirktraceId/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 spans

That 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 saysMeaningClient must
200 / OK with partial_success setSome items rejected: rejected_spans + error_messageNot retry. The accepted portion landed; retrying duplicates it
gRPC UNAVAILABLE, DEADLINE_EXCEEDED, ABORTED, CANCELLED, OUT_OF_RANGE, DATA_LOSSTransientRetry with backoff
gRPC RESOURCE_EXHAUSTEDRetryable only if the server attached RetryInfoOtherwise treat as permanent — this asymmetry surprises people
HTTP 429, 502, 503, 504Transient; may carry Retry-AfterHonor Retry-After, else exponential backoff
Any other 4xx/5xxPermanent — bad payload, bad auth, wrong pathDrop. 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)
APIYes — the whole projectYes, but fused to the SDKYes, separately versioned and stable
SDKNone. Every vendor shipped their own tracerYes, one implementationYes — and the application picks it
Agent / collectorNoneOpenCensus Agent + ServiceThe Collector (see The Collector), the direct descendant
Data modelLoose. Tag keys were conventions in a wikiDefined, but Google-shapedSemantic conventions, versioned and stabilizing (see The Span)
SignalsTraces onlyTraces + metricsTraces, metrics, logs, profiles
GovernanceVendor-consortium, no reference impl to anchor itGoogle-drivenCNCF, 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.method means 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.