Product wants to know which customers experience the slowest checkouts. How do you answer with traces?
IntermediateScenarioTracing and OpenTelemetry
Answer
Situation read → You need customer-level latency analysis without high-cardinality metrics.
What I'd do →
- Add
customer.idorcustomer.tieras a span attribute on the checkout span. - Query with TraceQL in Tempo:
{ span.name = "checkout" && duration > 2s } | select(span.customer.tier)
- Use TraceQL metrics (
| quantile_over_time(duration, 0.99) by (span.customer.tier)) for aggregated views on recent versions. - Keep customer IDs out of Prometheus labels.
Why → Traces hold high-cardinality attributes cheaply; metrics do not.
Interview tip → Split which data goes where: tiers in metrics, IDs in traces.
More on Tracing and OpenTelemetry
Your company has 30 microservices and no tracing. How do you roll out distributed tracing?IntermediateTraces 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?Intermediate