What is distributed tracing, and what is a span and a trace? [Advanced]
Answer
Distributed tracing follows a request across service boundaries. A trace is the full end-to-end request journey; a span is one timed operation within that journey, such as an HTTP handler, database call, queue publish, or downstream RPC.
Technical explanation
Each span has a trace ID, span ID, parent span ID, timestamps, attributes, events, and status.
Traces reveal dependency latency, fan-out, retries, and where errors occur in a call chain.
Tracing is most valuable when service names, routes, status codes, and error attributes follow consistent conventions.
Hands-on example
Example: checkout request trace includes spans: ingress -> checkout POST /orders -> inventory reserve -> payment authorize -> database insert -> Kafka publish. If p95 latency rises, the trace waterfall shows payment authorize consumes most of the time.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Observability interview questions
- What is head-based versus tail-based sampling for traces? [Advanced]
- What is cardinality cost, and how does it differ between metrics and logs? [Advanced]
- What is the difference between the OpenTelemetry SDK and the Collector? [Advanced]
- How do you build alerts in Wavefront, and what is a smart alert? [Advanced]
- How does Wavefront handle high-cardinality metrics compared to Prometheus? [Advanced]
- What is the Wavefront proxy, and why use it? [Advanced]
- What is Wavefront (Tanzu Observability), and what is it used for? [Advanced]
- How do you correlate logs and metrics during an incident? [Advanced]