Interview's MateKubernetes
Interview's Mate

Kubernetes

K8s · Workloads · GitOps · Cloud

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Kubernetes topics
Lesson 128/ 160
07. Observability, Troubleshooting & SRE

Distributed Tracing with OpenTelemetry Collector & Jaeger/Tempo

Trace requests across services with OTel collectors and Jaeger or Tempo backends.

AdvancedOpenTelemetry · Jaeger · Tempo3 quiz questions
Practice DevOps Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

OpenTelemetry attaches a parcel tracking number at each handoff, while Jaeger or Tempo stores the route map for search. The simple Kubernetes rule is: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.

Think of it like…

OpenTelemetry attaches a parcel tracking number at each handoff, while Jaeger or Tempo stores the route map for search.

Where you’ve seen it

An SRE testing a diagnosis runs kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133. Expected evidence: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis. If the run instead shows this symptom, stop and restore the last known state: Head sampling can discard the rare failure, exporter backpressure can drop spans, and unpropagated trace context breaks a request into unrelated roots.

Words you’ll hear

OpenTelemetry
For this lesson, OpenTelemetry is the controlling idea: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.
Jaeger
Jaeger is the checkpoint; run kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133 and inspect the owner chain. Head sampling can discard the rare failure, exporter backpressure can drop spans, and unpropagated trace context breaks a request into unrelated roots.
Tempo
Tempo is the outcome to preserve; the cost is explicit: Tracing explains causal latency but sampling, attribute cardinality, Collector capacity, and backend retention increase cost as traffic grows.
Verification evidence
The evidence command is kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133. It connects the declaration to this behavior: Trace requests across services with OTel collectors and Jaeger or Tempo backends.

Visual diagram

Loading interactive diagram

Theory & deep dive

How OpenTelemetry reaches the intended state

Trace requests across services with OTel collectors and Jaeger or Tempo backends. OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.

The concrete checkpoint is kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133; compare the OpenTelemetry owner, Jaeger state, and Tempo outcome instead of treating YAML acceptance as proof.

Verify Jaeger, not only object creation

Run kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133 after the change and correlate the result with Events and the owning object. OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.

Key takeaway: OpenTelemetry is implemented only when this invariant remains observable: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.

Jaeger: failure boundary and production cost

Head sampling can discard the rare failure, exporter backpressure can drop spans, and unpropagated trace context breaks a request into unrelated roots. The prerequisite contract is concrete: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.

Tracing explains causal latency but sampling, attribute cardinality, Collector capacity, and backend retention increase cost as traffic grows. A safe design limits blast radius, records the last good configuration, and uses kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133 as a deterministic rollback checkpoint.

Recover from Jaeger drift

Capture the current state with kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133, then correct the controlling manifest rather than patching a child object; the relevant divergence signal is specific: Head sampling can discard the rare failure, exporter backpressure can drop spans, and unpropagated trace context breaks a request into unrelated roots.

Key takeaway: Accept the trade-off consciously: Tracing explains causal latency but sampling, attribute cardinality, Collector capacity, and backend retention increase cost as traffic grows.

How it works, step by step

Step 1 of 4
SRE and service owner

1. Define the symptom and SLI

Turn the user symptom into a measurable question and select a telemetry source: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.

OpenTelemetry contract → owned state
Key numbers at this step
Goal
Trace requests across services with OTel collectors and Jaeger or Tempo backends.
Owner
OpenTelemetry

When to use it & trade-offs

What it is

Trace requests across services with OTel collectors and Jaeger or Tempo backends. OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.

Why it matters: Head sampling can discard the rare failure, exporter backpressure can drop spans, and unpropagated trace context breaks a request into unrelated roots. The invariant at risk is specific: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis. The quickest fact check before changing the design is kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133.

When to reach for it

  • Use OpenTelemetry to enforce this invariant: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.
  • Use Jaeger evidence from kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133 in reviews and incident timelines. Trace requests across services with OTel collectors and Jaeger or Tempo backends.
  • Choose the managed observability backend route only when this cost is justified by governance or scale: Tracing explains causal latency but sampling, attribute cardinality, Collector capacity, and backend retention increase cost as traffic grows.

When to avoid or be careful

  • Avoid assuming OpenTelemetry is complete after YAML submission; the required behavior is concrete: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.
  • Avoid treating the next symptom as random; check the owner and state with kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133 first: Head sampling can discard the rare failure, exporter backpressure can drop spans, and unpropagated trace context breaks a request into unrelated roots.
  • Avoid adopting a heavier platform wrapper before measuring its cost: Tracing explains causal latency but sampling, attribute cardinality, Collector capacity, and backend retention increase cost as traffic grows.

Native, manual, and managed paths for OpenTelemetry

Metrics and evidence-led diagnosis
Best for: Trace requests across services with OTel collectors and Jaeger or Tempo backends. A concrete incident check is kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133.

Strengths: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.

Watch out: Tracing explains causal latency but sampling, attribute cardinality, Collector capacity, and backend retention increase cost as traffic grows. Recovery must also recognize this signal: Head sampling can discard the rare failure, exporter backpressure can drop spans, and unpropagated trace context breaks a request into unrelated roots.

Ad-hoc console inspection
Best for: Quickly testing the Jaeger assumption with kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133; the expected invariant is: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.

Strengths: kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133 gives immediate feedback without first building a platform layer.

Watch out: A manual change can hide drift, and unlike OpenTelemetry, it does not make this symptom self-documenting: Head sampling can discard the rare failure, exporter backpressure can drop spans, and unpropagated trace context breaks a request into unrelated roots.

Managed observability backend
Best for: Teams that need Tempo integrated with guardrails; the evidence path is kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133.

Strengths: Platform controls can wrap this exact behavior in policy or dashboards: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.

Watch out: The added platform ownership buys value at this cost: Tracing explains causal latency but sampling, attribute cardinality, Collector capacity, and backend retention increase cost as traffic grows.

Interview signals & numbers to know

When this topic comes up

  • Interview anchor: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.
  • Trace OpenTelemetry to Tempo through Jaeger; the invariant is: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.
  • Recognize the symptom: Head sampling can discard the rare failure, exporter backpressure can drop spans, and unpropagated trace context breaks a request into unrelated roots.
  • Justify the cost: Tracing explains causal latency but sampling, attribute cardinality, Collector capacity, and backend retention increase cost as traffic grows.
  • Verify with kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133 instead of only inspecting YAML.

Benchmarks & rules of thumb

1 -
trace context should propagate across every service hop
2 -
common sampling locations: head and tail
100% -
unsampled tracing is too expensive for many high-volume APIs

Common mistakes & follow-ups

Common interview mistakes

  • Debugging only the child object misses the OpenTelemetry owner contract: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis.
  • Ignoring this telltale condition leads to unrelated changes: Head sampling can discard the rare failure, exporter backpressure can drop spans, and unpropagated trace context breaks a request into unrelated roots.
  • Repeating kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133 without an owner for remediation wastes retry cost. Tracing explains causal latency but sampling, attribute cardinality, Collector capacity, and backend retention increase cost as traffic grows.

Likely interviewer follow-ups

  • How would API output and runtime evidence prove this behavior: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis?
  • Which owner object, logs, and Events would you inspect for this symptom-Head sampling can discard the rare failure, exporter backpressure can drop spans, and unpropagated trace context breaks a request into unrelated roots-?
  • At what threshold would this cost become unacceptable: Tracing explains causal latency but sampling, attribute cardinality, Collector capacity, and backend retention increase cost as traffic grows?
Interview tip: Interview sequence: state the invariant, run kubectl get opentelemetrycollector -A; kubectl get svc -n tracing | grep -E 'jaeger|tempo'; curl -s http://collector:13133, name the failure, then justify the cost. Invariant: OpenTelemetry SDKs and the Collector receive OTLP spans, process and sample them, then export to Jaeger or Grafana Tempo for trace search and dependency latency analysis. Failure: Head sampling can discard the rare failure, exporter backpressure can drop spans, and unpropagated trace context breaks a request into unrelated roots. Cost: Tracing explains causal latency but sampling, attribute cardinality, Collector capacity, and backend retention increase cost as traffic grows.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Distributed Tracing with OpenTelemetry Collector & Jaeger/Tempo with generative AI interview Q&A and hands-on practice.

Open DevOps Q&A →Tech Learn Q&A
Previous topic
Centralized Logging with Grafana Loki & OpenSearch/ELK
Next topic
Kubernetes Events & Interpreting kubectl describe Output