From the course: Node.js: Debugging and Performance Tuning
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Cross-application request correlation
From the course: Node.js: Debugging and Performance Tuning
Cross-application request correlation
- [Instructor] The problem of correlating logs for a request is compounded when working with multiple services. A single request can potentially call multiple microservices in order to build a single response. How can you track a single request without having each service create unique identifiers? This solution is known as cross-application request correlation. It sounds complex, but, honestly, it's more about extending what we've already been doing. When making your request to another application or system, include the request ID. Practically, this means setting an X-Request-Id header in any requests made. The system receiving the request with the request ID then uses the provided request ID it's given for its logging. This is a great technique, but it does have some practical drawbacks. To fully take advantage of this technique can take a lot of work, especially if the application wasn't designed to include them from the beginning. Every system needs to be able to generate and/or…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Why and what should I log?6m 26s
-
Problems with Node.js console6m 1s
-
(Locked)
Implementing Express error pages6m 48s
-
(Locked)
Choosing a logging library5m 40s
-
(Locked)
Adding Winston for Node logging4m 41s
-
(Locked)
Request logging with Morgan6m 39s
-
(Locked)
Correlating requests in logs6m 18s
-
(Locked)
Cross-application request correlation5m 32s
-
(Locked)
Challenge: Cross-application request IDs2m 14s
-
(Locked)
Solution: Cross-application request IDs9m 30s
-
(Locked)
-
-
-