In plain words
Distributed tracing gives each request an ID that travels with it between services and records every step as a timed span, so you can see where a slow request spent its time.
Where you see it
Checkout on Harbor takes four seconds. In Grafana Tempo or Jaeger, the trace for one slow request draws a waterfall: the API takes 40 ms, billing waits 3.6 seconds on the tax provider, and the database takes 30 ms. The longest bar is your answer.
What goes wrong
- Dropping the context between services
If one hop doesn't forward the traceparent header, the trace splits in two and the slow part seems to come from nowhere. Use OpenTelemetry's instrumentation for your HTTP client so the context travels with each call.
- Sampling away the interesting requests
Keeping 1 percent of traces at random means you rarely keep the slow or failing ones. Tail-based sampling in the OpenTelemetry Collector decides after a trace finishes, so it can keep every error and every slow request.
- Losing the trail across a queue
A job picked up by a worker starts a fresh trace unless the producer puts the trace context into the message. Pass it along, so the worker's spans link back to the request that queued them.
What to tell your agent
Quick check
Sign in to earn +10 XP for itA trace for a slow Harbor checkout shows the API span at 4.1 seconds, with a 3.8-second stretch where no child span appears. What's the most likely explanation?