SynfraCore
Synfracore
Start Learning
Navigation

Academies

Platform

RoadmapsLabsCertificationsInterviewPYQsAI AssistantCareer
Start Learning Free Learning Roadmaps

OpenTelemetry — Overview

What it is, why it matters, architecture and key concepts

📄
Last updated Nov 2026
Expert Content

OpenTelemetry

One instrumentation standard for traces, metrics, and logs — pick your backend later

Category: Monitoring & Observability

Reading order: the case for a vendor-neutral standard, the modules below, a runbook-style example, interview prep at the end.

Before you start: basic familiarity with what a metric, a log line, and a distributed request are helps (see the Prometheus or Grafana tracks if you need that grounding first). No prior observability-vendor experience is assumed.


Why OpenTelemetry?

Before a shared standard existed, instrumenting an application for observability meant picking a metrics client, a tracing SDK, and a logging library — often three unrelated libraries from three unrelated vendors, each with its own API and its own assumptions about what data looked like. Swapping observability vendors later meant re-instrumenting the application from scratch, because the old SDK's calls were baked directly into application code.

OpenTelemetry (OTel) is a CNCF project that separates how you instrument from where the data ends up. An application emits data through one vendor-neutral API; a separate piece, the Collector, decides where that data is routed. Changing backends — from one vendor to another, or adding a second backend alongside the first — becomes a Collector configuration change, not an application code change.

Analogy — OpenTelemetry is a universal power adapter, not a new kind of electricity. Before it, every country's socket shape forced you to carry a different plug for every destination, or rewire the device itself. A universal adapter doesn't change what electricity is; it standardizes the plug so any device works at any socket. OTel standardizes how an application emits telemetry so it can plug into whichever backend you choose, or switch later, without rewiring the application itself.

The Three Signals, and How They're Produced

OpenTelemetry covers three kinds of telemetry under one umbrella, each produced the same structural way:

•Traces — a record of one request's path across services, made of spans (one span per unit of work) linked into a tree.
•Metrics — aggregated numeric measurements over time, like a counter or a histogram.
•Logs — discrete, timestamped event records, which OTel can enrich with the same trace/span identifiers as the request that produced them.

That shared enrichment is the real payoff of treating all three as one system rather than three separate tools: a slow request's trace, its related log lines, and the metric spike it caused can all be correlated through shared identifiers, instead of three engineers in three different dashboards trying to line up timestamps by hand.

Application code
Instrumented once, via the OTel API
OTel SDK
Generates spans, metrics, log records
OTel Collector
Receives, processes, routes
Any backend(s)
Swappable without touching app code

Learning Modules

Module 01 — API vs. SDK, and Auto- vs. Manual Instrumentation

What application code actually calls, and what's generated for free

Topics covered:

•The OTel API (what your code calls) vs. the SDK (what actually processes it) — 🟡 Intermediate
•Auto-instrumentation — common libraries get spans for free — 🟢 Beginner
•Manual instrumentation — custom spans for your own business logic — 🟡 Intermediate

OpenTelemetry splits the API an application calls from the SDK that implements it, specifically so a library can depend only on the lightweight API without forcing every consumer of that library to also pull in a specific SDK implementation. Auto-instrumentation agents patch common frameworks (an HTTP server, a database driver) to emit spans without any code changes; manual instrumentation is for the parts of your own business logic that auto-instrumentation can't see into.

Module 02 — Context Propagation

How a trace stays connected across service boundaries

Topics covered:

•Trace context — carrying a trace ID and span ID across a network call — 🟡 Intermediate
•The W3C Trace Context header format — 🔴 Advanced (verify exact header syntax against the current W3C spec — this is a living web standard, not an OTel-specific one)
•Baggage — propagating arbitrary key-value context alongside trace IDs — 🔴 Advanced

A trace spanning five services only stays one trace if each hop passes the current trace ID forward — usually via an HTTP header injected by the calling service's SDK and read by the receiving service's SDK. Losing that header anywhere in the chain (a proxy that strips unknown headers is a common real cause) silently splits one logical request into several disconnected traces.

Module 03 — The Collector: Receivers, Processors, Exporters

The configurable pipeline that decouples instrumentation from backend choice

Topics covered:

•Receivers — how telemetry gets into the Collector — 🟡 Intermediate
•Processors — batching, filtering, enriching in flight — 🔴 Advanced
•Exporters — where processed telemetry goes next — 🟡 Intermediate
bash
# collector-config.yaml — a minimal pipeline for one service's traces and metrics

receivers:
  otlp:
    protocols:
      http:
        endpoint: 0.0.0.0:4318   # this service's SDK is configured for HTTP, not gRPC

processors:
  batch: {}
  filter/drop_health_checks:
    traces:
      span:
        - 'attributes["http.route"] == "/healthz"'

exporters:
  otlphttp/tempo:
    endpoint: http://tempo:4318
  prometheusremotewrite:
    endpoint: http://prometheus:9090/api/v1/write

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [filter/drop_health_checks, batch]
      exporters: [otlphttp/tempo]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [prometheusremotewrite]

The filter processor above drops health-check spans before they're exported — a small example of the Collector doing real work (cost control, noise reduction) without touching a single line of the instrumented application.


Production Example

bash
# Production Runbook — "traces stop appearing for one specific service, others are fine"

# Step 1: Check whether the SDK is even exporting, before suspecting the Collector
# Enable the SDK's own debug/console exporter temporarily and confirm spans
# are being generated locally — this isolates "not instrumented" from
# "instrumented but not reaching the Collector"

# Step 2: Confirm the Collector is receiving from that service specifically
# Check the Collector's own internal metrics (otelcol_receiver_accepted_spans)
# broken down by receiver -- a zero count there, with spans confirmed
# locally in Step 1, points at a network/config problem between app and Collector

# Step 3: Common root causes, roughly in order of frequency
# - wrong OTLP endpoint/port in the SDK's exporter config (4317 grpc vs 4318 http -- easy to mix up)
# - a sampler configured to drop nearly everything for this specific service
# - a processor silently filtering this service's spans (check filter/attribute processors)

# Step 4: Verify the fix with the same debug exporter, then remove it
# Don't leave a debug/console exporter running in production -- it's a
# diagnostic step, not a permanent pipeline stage

Interview Prep

Walk through Problem, Solution, Result for each one — about a minute per answer is the target.

What You Might Get Asked

Q1. Auto-instrumentation can add spans without touching application code. Why would you still write manual spans?

A: Problem: an auto-instrumentation agent only knows about the framework and library calls it was built to recognize — it has no visibility into a team's own business logic. Solution: manual spans fill that gap, wrapping whatever internal step actually matters for understanding a request — a pricing calculation, a batch of validation rules — that no generic agent could have anticipated. Result: the two together cover both the plumbing (automatic) and the business-specific steps (manual) without forcing every span to be hand-written from scratch.


Q2. What is baggage, and why shouldn't a team put everything useful into it?

A: Problem: teams want context set early in a request (a tenant ID, an experiment variant) available many hops downstream, without manually threading it through every function signature in between. Solution: baggage propagates arbitrary key-value pairs alongside the trace context itself, so any downstream service can read it directly. Result: because baggage travels on every single hop as request metadata, it adds real per-request overhead — a sensible fit for a handful of small values, not a general-purpose way to move data around a system.


Q3. Why choose a Histogram instrument over a Counter for tracking request duration?

A: Problem: a counter can only ever go up, so it can tell you total requests served but nothing about how long any individual request took. Solution: a histogram records a distribution of observed values, which lets a query layer compute percentiles later — p50, p95, p99 — instead of just a running total. Result: picking the metric instrument type to match what you'll actually need to ask later avoids discovering, mid-incident, that the data needed to answer "how slow, for whom" was never being recorded.


The Interview Q&A tab has the rest of the question set; Cheatsheets holds the pipeline config in one place for quick lookup.

Share:
Join our Community
Daily tips, job alerts, interview help — join engineers learning together
→
Up Next
🔤
OpenTelemetry — Fundamentals
Core concepts and commands — hands-on from the start
Also Worth Exploring
← Back to all OpenTelemetry modules
Prerequisites →