Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: add request id generator middleware #156

Closed
Haswf opened this issue Jul 28, 2022 · 0 comments
Closed

Proposal: add request id generator middleware #156

Haswf opened this issue Jul 28, 2022 · 0 comments
Assignees

Comments

@Haswf
Copy link
Contributor

Haswf commented Jul 28, 2022

Is your feature request related to a problem? Please describe.

Generating unique identifer(e.g. X-Request-ID) for each request is a common way to correlate various log entries in micro-service design. It would be challenging to diagnose problem without a common piece of information, especially when multiple services are involved in processing the request.

Most of web frameworks support this feature via a middleware.

Similar projects:
https://www.npmjs.com/package/express-request-id
https://github.com/gin-contrib/requestid

Describe the solution you'd like

Add a request id middleware that

  • generate a random request id for each request
  • pass through request id in response if it's present in the original request.

Describe alternatives you've considered

None

Additional context

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants