Node.js · Middle · Question 60 of 75

Why should logs include a request ID?

Explanation

Generate or accept a request ID, pass it to downstream calls in a header and add it to every log line, for example with AsyncLocalStorage.

Further reading

Problem with a question

Node.js · Middle · question 60

Test yourself

Take the Node.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz