Hi guys, I’m building a small web server, using the clean-arch philosophy.
It’s a small app, so I don’t want to over-engineering something, like using a distributed system or something like that, but k8s could be my deployment choice.
I want to attach a request ID to every request and pass it all the way to the DB access layer and log everything with this request ID, such I can track the whole process if the user submits the request ID(I’ll send the request ID as a field in response JSON and display it to the user just like FB does)
While I’m using echov4, I can install the request ID middleware, extract the ID, bind it with logger and pass it way down.
But I’m worried if these IDs will ever collide, I have seen someone using opentrace, Zipkin, etc . But they are for the distributed system.
Any suggestions will be welcomed! 😉
Edit: the title should be about tracking, not tracing.