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

Identifiers via correlational IDs 

We generate a unique identifier or a correlation ID when we are making the very first service request. The generated unique ID is passed downstream to other calling microservices. That way, we can use the uniquely generated ID coming from the response to get logs specified to any service request. For that, we have a so-called correlation identifier or uniquely generated UUID to pass it to all services that the transaction goes through. To generate a unique ID, NPM has module UUID (https://www.npmjs.com/package/uuid).

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