Correlating One Request Across Service Logs

A correlation identifier can connect diagnostic events from cooperating components, letting a maintainer reconstruct relevant parts of a request.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace multiple actions
  2. Record observation scopes
  3. Connect related observations without confusing their causes
  4. Keep event identity and sensitive payload separate

Trace multiple actions

A query arrives at a catalogue service and asks a search component to load results. Each can record the same request label and its own timing. Diagnostic context determines relevant fields.

Record observation scopes

Correlation identifies related events. Time skew and parallel calls affect their apparent order. Remote calls help distinguish which dependencies actually ran.[1]

Connect related observations without confusing their causes

A catalogue passes a stable request correlation value to two service calls. Logs may then show one request fanning out to inventory and prices. The individual operations still need their own phase or span names so a delay can be located. See end-to-end request tracing.

request R: catalogue receives
request R, operation inventory: response ready
request R, operation price: timeout
catalogue returns documented partial or failed result

Keep event identity and sensitive payload separate

Correlation should not require logging record contents or authentication values. Tests can use synthetic identifiers and check that parent and downstream observations remain connected through one failure.

References

  1. Google, Site Reliability Engineering ↩