We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Logging Context

A log entry is only as valuable as the story it tells, and a huge part of every story is the context in which it takes place.

The story of Frodo taking the ring to Mordor would have been very different (read: awful) if it had happened on Tatooine. Likewise, an error log can have profoundly different implications depending on:

  • Which machine it came from
  • Which request it's related to
  • Which user it's related to
  • Which service in the monorepo produced it

Without that surrounding context, a log line is just a fragment of a story; with it, logs become a powerful tool for understanding what actually happened in a distributed system.