5 exercises on OpenTelemetry observability vocabulary.
0 / 5 completed
1 / 5
What is OpenTelemetry (OTel)?
OpenTelemetry is a CNCF project providing a single, vendor-neutral standard for instrumenting applications to emit the three signals of observability: traces, metrics, and logs. It defines APIs, SDKs, semantic conventions, and the OTLP wire protocol, plus the Collector for receiving and exporting data. Its central value is decoupling instrumentation from the backend: you instrument once with OTel, then export to Jaeger, Prometheus, Datadog, Honeycomb, or any compatible system — avoiding vendor lock-in and the need to re-instrument when you switch tools.
2 / 5
What is a span and how do spans form a trace?
A span is the building block of a trace: it records a single operation (an HTTP handler, a DB query, an RPC) with a name, start time, duration, status, and key-value attributes. Each span has a span ID and a parent span ID, and all spans for one request share a trace ID. Connecting them by parent-child links produces a trace — a tree showing how a request flowed across services and where time was spent. The root span has no parent; context propagation carries the trace/span IDs across service boundaries.
3 / 5
What are the three pillars (signals) of observability, and what does each answer?
The three signals are complementary. Metrics are cheap aggregated numbers (rates, counts, latency percentiles) ideal for dashboards and alerting — they tell you that something is wrong. Logs are discrete, detailed event records ideal for understanding what happened at a specific moment. Traces show the causal path of a single request across services, revealing where latency or errors occur. The workflow: metrics alert you, traces localize the problem to a service/operation, logs explain the details. OTel unifies the collection of all three.
4 / 5
What is context propagation and why is it essential for distributed tracing?
Context propagation carries the active trace context — primarily the trace ID and parent span ID — from one service to the next, typically via the W3C traceparent header on HTTP/gRPC calls (or message metadata for async). Without it, each service would start a brand-new trace and you could never connect the spans into a single end-to-end view of the request. The classic failure mode is a service that processes a request but forgets to forward the header, "breaking" the trace at that hop. Auto-instrumentation usually handles propagation, but async boundaries often need manual care.
5 / 5
Why is high cardinality a concern in metrics, and how do traces help instead?
Cardinality is the number of distinct label-value combinations on a metric. Because each combination is a separate stored time series, adding a high-cardinality label like user_id or request_id can create millions of series, blowing up memory and cost in a metrics backend like Prometheus. The rule: keep metric labels low-cardinality (status code, route template, region). For high-cardinality, per-request detail — "which specific user hit this slow path?" — use traces and logs, which are designed to carry rich per-event attributes without the time-series explosion.