Skip to content
StackDecode
System Design
17. Observability and MonitoringAnimated

Correlation IDs

A shared id tying together all logs of a request.

The idea

Generate an id at the edge and pass it through every service and log line.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

AppsCollectorMetrics (Promet…Logs (Loki)Traces (Tempo)Dashboards
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Apps emit metrics, logs and traces.

step:
1/4
at:
Apps
1/9

The green dot is a request moving through the system.

Step by step

  1. 1Create the id at the entry point
  2. 2Pass it in headers
  3. 3Log it everywhere
  4. 4Search by id

Where it is used

Debugging across services.

Watch out for

Every hop must propagate it.

Related