-
Notifications
You must be signed in to change notification settings - Fork 264
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
Configurable correlation id #311
Comments
What exactly is your intent? Sounds a lot like https://github.com/zalando/tracer to me. |
Basically Logbook uses 'correlation' to connect a request to a response log statement. We a making log statements inbetween the request and response (on the same server, in the same log output bucket) and so now add 'our own correlation' to the root of the JSON log statement. So in other words I'd like the 'correlation' Logbook is adding to not be a child in the request/response logging JSON tree, but rather added to the MDC so that it is present in the root of the logged JSON tree and thus present on all log statements between Logbook request and response filters. |
The correlation feature in logbook is purely to connect request and response. The primary use case is described in Logbook + Scalyr. What you describe is almost to the nail what Tracer offers. Those are two different aspects, hence why we split them up into different projects. |
Make logging the correlation id optional.
Context
We add a unique request-id to the MDC context for each incoming request. This allows us to see all log statements resulting from a call.
If interesting, we also add a hash of the authorization and our own trace id.
Possible Implementation
Boolean configuration value
Your Environment
Kubernetes / Stackdriver - single log file.
The text was updated successfully, but these errors were encountered: