O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tracing requests

Tracing request origins is very important, as sometimes we need to reconstruct the entire journey of the customer in our system. It provides useful information on the system, such as sources of latency. It also enables developers to observe how an individual request is being handled by searching across all aggregated logs with some unique microservice ID, or to find out the overall journey of the user by passing in a time frame. The following is a sample log generated through Winston:

{ level: 'info', serviceId: 'hello world microservice' ,   message: 'What time is the testing at?',   label: 'right meow!', timestamp: '2017-09-30T03:57:26.875Z' }

All important data can be seen from the log. We will be using the ELK Stack for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required