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

Pull Queries: include unique correlation id in processing logs #3576

Open
big-andy-coates opened this issue Oct 15, 2019 · 2 comments
Open
Labels
operability Issues pertaining to running and operating KSQL, notably in production query-engine Issues owned by the ksqlDB Query Engine team

Comments

@big-andy-coates
Copy link
Contributor

At the moment the pull query code builds a unique query id per request and embeds this in the result returned to the user.

We should extend this so that each request the rest server receives should generate a unique correlation id, which is logged at the start of the call. This correlation id should then be passed to ConfiguredStatement. For pull & transient queries, this id should be used in the query id, for anything persisted to the command topic this correlation id should be included.

This will allow people to use the logs to trace back when and who made the original request.

@big-andy-coates big-andy-coates mentioned this issue Oct 15, 2019
27 tasks
@big-andy-coates big-andy-coates self-assigned this Dec 2, 2019
@big-andy-coates big-andy-coates removed their assignment Jun 19, 2020
@big-andy-coates big-andy-coates added the operability Issues pertaining to running and operating KSQL, notably in production label Jun 19, 2020
@agavra agavra added needs-triage query-engine Issues owned by the ksqlDB Query Engine team labels Feb 3, 2021
@AlanConfluent
Copy link
Member

We should consider doing this using either a http://logback.qos.ch/manual/mdc.html, or just explicitly logging a generated id.

The only issue is that logging per pull query hurts performance, so we only do debug logging at the moment. This presumably would be a part of those logs.

@agavra
Copy link
Contributor

agavra commented Feb 5, 2021

That makes a lot of sense, it seems like log4j has a similar concept: https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/MDC.html I hadn't heard of that before, but seems promising.

Given that the performance characteristics are questionable, I think we can probably give this a lower priority - but it should be on our radar to build out our support model. I'll leave the needs-triage for now, but I think p1 makes sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
operability Issues pertaining to running and operating KSQL, notably in production query-engine Issues owned by the ksqlDB Query Engine team
Projects
None yet
Development

No branches or pull requests

3 participants