-
Notifications
You must be signed in to change notification settings - Fork 19
log when clearing trace #678
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
This comment has been minimized.
This comment has been minimized.
| } | ||
|
|
||
| private static void logClearingTrace() { | ||
| log.debug("Clearing current trace", SafeArg.of("maybeTrace", Optional.ofNullable(currentTrace.get()))); |
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.
nit: Let's wrap this with log.isDebugEnabled to prevent optional and safeArg allocations when debug logging is disabled.
note: no reason to use an Optional for the safe-arg, as far as the logging system is concerned empty optional and null are indistinguishable.
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.
While we're here, thoughts on mirroring the debug line after a traceId is set? That way we get a full sense of the scope transitions.
carterkozak
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.
oof, I never submitted comments. Sorry for the delay!
Approving, change looks good to me. Up to you whether you'd like to take action on the nits.
f41e2e7 to
f3ec634
Compare
|
Released 4.11.0 |
We're seeing instances of trace information disappearing from logs on a thread that previously had traceIds. Trying to track down where/how they're getting cleared.
==COMMIT_MSG==
debug logging when clearing trace
==COMMIT_MSG==