invoicing3 / api-gateway

exposing microservices endpoints to external world, parsing request and apply authentication, authorization and logging before sending request to the microservice
2 stars 0 forks source link

implement request logging #2

Open ali3bdalla opened 1 year ago

ali3bdalla commented 1 year ago

A microservices-based application might have several services running and communicating amongst themselves. Things get complicated when one or more services fail, and you need to know which one failed and why. It’s also essential that you’re able to comprehend the whole request flow — which services were invoked, how many times and in what order API-gateway is the start point for all requests so this microservice should have to initialize logging context, logging context is a set of identifiers and labels that help us to track each request in different services UUID besides the service name could be the minimum logging context to track users' logs in different microservices

Image

ali3bdalla commented 1 year ago

our API-gateway is NestJs based application, this package seems to be interesting https://github.com/iamolegga/nestjs-pino