Interview Observability

How does context propagation work across services in tracing? [Advanced]

Answer

Context propagation passes trace context across service boundaries so spans can be linked into one trace. It usually uses HTTP headers such as W3C traceparent and tracestate, and equivalent metadata for messaging or RPC systems.

Technical explanation

The caller injects trace context into outbound requests; the callee extracts it and creates child spans.

Without propagation, each service creates separate traces and root-cause analysis becomes fragmented.

For asynchronous systems, context should be propagated through message headers while respecting security and privacy rules.

Hands-on example

Hands-on: ensure services use OTel auto-instrumentation or middleware for HTTP/gRPC. Verify outgoing requests contain traceparent. For Kafka, propagate trace context in message headers. In the trace UI, confirm checkout, payment, inventory, and notification spans share the same trace ID.

Preparing for an interview?

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

← All Observability questions