OpenTelemetry is the industry standard for distributed tracing and observability. Master the vocabulary for traces, spans, attributes, events, propagators, and samplers used in modern distributed systems.
0 / 5 completed
1 / 5
In OpenTelemetry, a trace is composed of multiple spans. What uniquely identifies all spans belonging to the same trace?
Every span in a distributed trace shares the same trace_id — a 16-byte random identifier generated when the trace begins. This ID is propagated across process boundaries (via HTTP headers like traceparent) so that spans from many services can be correlated into a single end-to-end trace.
2 / 5
A developer calls span.set_attribute("db.statement", query). According to OTel semantics, what are span attributes?
Span attributes are key-value pairs (string, int, float, bool, or arrays) that describe the span's operation. OpenTelemetry defines semantic conventions for common attributes (e.g., http.method, db.system) to ensure consistent meaning across implementations and observability backends.
3 / 5
Your team uses the W3C traceparent header for context propagation. Which OTel component is responsible for injecting and extracting this header?
A Propagator implements the TextMapPropagator interface and is responsible for injecting trace context into outgoing request headers and extracting it from incoming ones. The TraceContextPropagator handles the W3C traceparent/tracestate format specifically.
4 / 5
An OTel sampler returns DROP for a span. What is the practical effect of this sampling decision?
A DROP sampling decision means the span is not created, recorded, or exported. The is_recording flag returns False, so attribute/event calls are no-ops. This is how head-based sampling reduces overhead — spans are discarded before any work is done on them.
5 / 5
A developer adds a span event with span.add_event("cache.miss", {"key": "user:42"}). How do span events differ from spans?
Span events are timestamped structured log entries attached to a parent span. Unlike spans, they represent a point-in-time occurrence (no duration) within the span's lifetime. They appear alongside the span in trace UIs, bridging the gap between logs and traces without creating additional span overhead.