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

Log 'requestId' for intra-cluster log correlation #16

Open
tallpsmith opened this issue Mar 1, 2012 · 1 comment
Open

Log 'requestId' for intra-cluster log correlation #16

tallpsmith opened this issue Mar 1, 2012 · 1 comment

Comments

@tallpsmith
Copy link

Well, first, thanks for this plugin, tried this locally in my dev environment and worked a treat, we're definitely going to use this in production.

However, what would be extra-awesome is if this plugin could allow the requesting client application to pass on a 'requestId' that correlates any ES logs with a unique requestID handle. What we do is when a user interacts with our site, a unique requestId token is generated and bundled as a threadLocal, and use log4j's MDC concept so that all user logs for that requestId have that requestId in them, allowing very simple filtering to find all logs for a given request.

Now when a client app interacts with something like ES, it would be great for the ES api to be able to pass on this requestID in the headers so that the logging on the ES side also has the same thing. This way all ES queries/interactions for a given user base action could be logged and correlated together.

ES has the X-Opaque-Id header which I had planned to look at as part of trying this myself, see elastic/elasticsearch#1202 but maybe this plugin is the best place to do it.

For reference, we're building up to something like Google's Dapper (http://research.google.com/pubs/pub36356.html) where by in a distributed system unique requests can be identified (we're sticking with a single 'span' concept though at this stage).

Love to have your comments, and thanks again for a great plugin.

@imotov
Copy link
Contributor

imotov commented Mar 2, 2012

As a workaround, you can repeat this id as a parameter on URL and it will be logged.

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