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

Configurable correlation id #311

Closed
skjolber opened this issue Jul 10, 2018 · 3 comments
Closed

Configurable correlation id #311

skjolber opened this issue Jul 10, 2018 · 3 comments

Comments

@skjolber
Copy link
Contributor

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.

@whiskeysierra
Copy link
Collaborator

What exactly is your intent? Sounds a lot like https://github.com/zalando/tracer to me.

@skjolber
Copy link
Contributor Author

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.

@whiskeysierra
Copy link
Collaborator

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.

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

No branches or pull requests

2 participants