API and SDK Separation, Providers and Plugin Interfaces: OTCA practice questions
OpenTelemetry splits each signal into an API and an SDK so that instrumentation never depends on a particular implementation. Libraries and frameworks reference only the API packages, and the spec overview says instrumentation authors must not directly reference any SDK package. The application owner decides whether to install the SDK, which exporters to use and how to configure everything else.
By Ibrahim Yesilay · Published · Updated
Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.
What API and SDK Separation, Providers and Plugin Interfaces covers in OTCA
OpenTelemetry splits each signal into an API and an SDK so that instrumentation never depends on a particular implementation. Libraries and frameworks reference only the API packages, and the spec overview says instrumentation authors must not directly reference any SDK package. The application owner decides whether to install the SDK, which exporters to use and how to configure everything else. Without an SDK the API stays functional but records nothing. Even then, a span created from a context that holds a remote parent is returned as a non-recording span carrying that parent's SpanContext, so trace context still flows to outgoing calls.
Providers are the entry points for each signal: TracerProvider, MeterProvider and LoggerProvider. The API should offer a way to register and read a global default provider, but an application may also create several provider instances, for example to give different span processors to different parts of a program. Configuration lives in the provider rather than in individual Tracers or Meters. The Tracing API also requires that users never have to obtain a Tracer again just to pick up configuration changes.
The SDK exposes two kinds of public surface that are not part of the API. Application owners use SDK constructors, and plugin authors use SDK plugin interfaces. On the tracing side the extension points include span processors, samplers, span exporters and ID generators. A sampler implements ShouldSample and returns DROP, RECORD_ONLY or RECORD_AND_SAMPLE, plus attributes and a Tracestate. The ID generator lets a vendor supply custom trace and span IDs; vendor-specific generators such as an AWS X-Ray one must not be shipped in core packages. Propagators are also pluggable, and the spec treats OTLP exporters and the TraceContext propagator as core packages defined by the specification.
Resources have their own extension point. Resource detectors for platforms such as Docker or Kubernetes, or for cloud vendors, must be published separately from the SDK. They return a resource that is merged into the one associated with a provider. A detector that finds nothing has not failed, but combining detectors whose non-empty Schema URLs differ is an error with an undefined result. On the metrics side, Views let the application owner change which instruments are kept, how they are aggregated and which attribute keys survive, without editing library code. A match-all View with the Drop aggregation disables instruments by default.
Exporters should stay thin. The client design principles ask vendors to implement the SDK exporter interface in a separate package and to rely on SDK helpers for batching, queuing and retry. The same principles describe an in-memory exporter that collects telemetry for unit tests. Optional packages that the project maintains are Contrib: API Contrib depends only on the API, while SDK Contrib also depends on the SDK.
Key points
- Instrumentation depends only on the API, and the application owner installs and configures the SDK.
- TracerProvider, MeterProvider and LoggerProvider own configuration, and several instances may exist in one process.
- Samplers, span processors, exporters, ID generators, propagators and resource detectors are SDK extension points.
- Vendor-specific components such as an X-Ray ID generator or platform resource detectors live outside the core SDK.
- Views customize metric output, including disabling instruments with a match-all Drop aggregation.
Three sample questions
21 OTCA questions on API and SDK Separation, Providers and Plugin Interfaces, 21 with explanations. How practice works
Question 1
- A.MeterConfigurator
- B.PeriodicExportingMetricReader
- C.Resource
- D.MetricExporter
Correct answer: A
Sources: OpenTelemetry spec: Metrics SDK, OpenTelemetry spec: Overview
Question 2
- A.The API has more frequent updates compared to the SDK.
- B.The SDK is more stable with less frequent updates compared to the API.
- C.Both API and SDK have similar stability and update frequencies.
- D.The API is more stable with less frequent updates compared to the SDK.
Correct answer: D
Sources: OpenTelemetry spec: Versioning and stability for OpenTelemetry clients, OpenTelemetry docs: Libraries
Question 3
- A.OpenTelemetry Collector
- B.OpenTelemetry API
- C.OpenTelemetry Instrumentation Libraries
- D.OpenTelemetry SDK
Correct answer: B
Sources: OpenTelemetry docs: Libraries, OpenTelemetry spec: Library guidelines
Practice this topic
Focus mode keeps every question on API and SDK Separation, Providers and Plugin Interfaces until you leave it. 10 free guest answers, then a free account; no credit card.
Or open OTCA practice across all topics.
Sources
The explanation above was checked against these official documents.
- OpenTelemetry spec: Overview (checked 2026-10-28)
- OpenTelemetry spec: Client Design Principles (checked 2026-10-28)
- OpenTelemetry spec: Tracing SDK (checked 2026-10-28)
- OpenTelemetry spec: Resource SDK (checked 2026-10-28)
- OpenTelemetry spec: Metrics SDK (checked 2026-10-28)
- OpenTelemetry spec: Tracing API (checked 2026-10-28)
Frequently asked questions
Who uses the SDK plugin interfaces?
Plugin authors, such as people writing a custom exporter, sampler or processor. Application owners use SDK constructors, and instrumentation authors use only the API.
What happens to an instrumented library when no SDK is installed?
It keeps working. API calls return valid objects, nothing is recorded or exported, and a parent SpanContext found in the context is still passed on so propagation is not broken.