Your company has 30 microservices and no tracing. How do you roll out distributed tracing?
IntermediateScenarioTracing and OpenTelemetry
Answer
Situation read → Debugging latency across services is guesswork. Roll out gradually with minimum code changes.
What I'd do →
- Standardise on OpenTelemetry (SDKs, OTLP protocol, W3C Trace Context).
- Deploy an OpenTelemetry Collector (agent DaemonSet plus gateway Deployment) exporting to Tempo, Jaeger or a vendor.
- Start with zero-code auto-instrumentation: Java agent, Python
opentelemetry-instrument, Node@opentelemetry/auto-instrumentations-node, or the OpenTelemetry OperatorInstrumentationCRD. - Instrument the edge first (gateway, ingress), then the most critical request path.
- Add manual spans for business operations later.
Why → Auto-instrumentation covers HTTP, gRPC, DB and messaging quickly; a central collector keeps exporters swappable.
Interview tip → Say "OTel for instrumentation, backend is a separate choice" to show vendor neutrality.
More on Tracing and OpenTelemetry
Traces stop at service B: you see spans from A, but B's spans start new traces. What is wrong?BeginnerTracing every request costs too much. How do you design sampling?IntermediateYou set up tail sampling with 4 Collector replicas, but traces are fragmented and error traces are missing. Why?AdvancedA checkout request takes 4 seconds. Walk through how you use a trace to find the cause.BeginnerYour OpenTelemetry Collector is getting OOMKilled under load. How do you stabilise it?IntermediateHow do you trace a request that goes through Kafka from a producer to three consumers?Intermediate