-
Notifications
You must be signed in to change notification settings - Fork 3.6k
feat: Utility for passing debug correlation id to query implementations #32851
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
Conversation
| * Expected to be used "around" calls to plugin query method, will clear the correlation id from thread local | ||
| * to make sure there is no leak between logic executed on shared threads. | ||
| */ | ||
| def withCorrelationId[T](correlationId: String)(block: () => T): T = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll probably only use this ourselves, with Scala, but shall we think about if it works for Java if we are making it public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. We could mark it as internal, but it will need to be binary compatible either way so I thought it can just as well be public API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added Java API
|
|
||
| /** | ||
| * @return Expected to be called directly after receiving a query call, before starting any asynchronous tasks, | ||
| * returns and clears out the correlation id to make sure there is no leak between tasks. Further passing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method doesn't "clears out"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ups, leftover from previous iteration
patriknw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.