Skip to content
Web Design & Development

Distributed Tracing, Done Properly

Following a single request as it passes through several services, queues and databases.

Marcus Adeyemi Technical Director 2 min read 18 views
Distributed Tracing, Done Properly

Where most projects go wrong

The usual mistakes:

  • Tracing only the web layer
  • Losing trace context across queues
  • Full tracing at unsustainable cost
  • Traces nobody looks at

What good looks like instead

  • Propagate trace identifiers across services
  • Instrument slow or critical paths first
  • Sample traces to control cost
  • Correlate traces with logs and metrics
  • Include background jobs in tracing
What to do and what to avoid with distributed tracing, side by side
Good practice against the usual mistakes, from the sources listed below.

Why it matters

In systems with more than one service, logs alone cannot explain where time went or where a request failed.

The specs that matter

Published figures for Distributed Tracing
MeasureFigure
Trace contexta shared identifier links spans across services
Spansrepresent units of work within a trace
Samplinghigh-volume systems trace a subset of requests
Standardstrace context propagation is standardized

Knowing when to hand it over

Tip: Bring in help when performance problems span services.

Where this comes from

The figures and practices above come from the sources listed.

Working on something like this?

We take on Web Design & Development work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

Marcus Adeyemi

Builds and maintains the web work. Writes about front-end architecture, performance, accessibility and the unglamorous parts of keeping a site alive.

Keep reading

More in Web Design & Development