Correlating logs and traces
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
find all logs for one request.
Planned topics
- Put
trace_idandspan_idin every log line (MDC fields, JSON logs). - In the tracing tool jump from a span to its logs; in the log tool search by trace id.
- Log structured JSON, not free text.
- Never log secrets or personal data.
Draft outline details
Demonstration
a JSON log line: {"level":"WARN","trace_id":"4bf9…","msg":"stock low","sku":"A12"}.
Check your understanding
Which id joins a log line to a trace?
Show answer
The trace id.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.