-
Notifications
You must be signed in to change notification settings - Fork 147
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
fix(tracing): Ensure clean MDC context at top coroutine scopes #1845
Conversation
@@ -15,6 +15,8 @@ class TracingSupport { | |||
companion object { | |||
const val X_SPINNAKER_RESOURCE_ID = "X-SPINNAKER-RESOURCE-ID" | |||
|
|||
val clearMDC: MDCContext = MDCContext(emptyMap()) |
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.
I think this should be emptyMDC
- when I read it as a parameter I thought it was a function that cleared the mdc context.
Actually, I think any wording for this - "empty", "clean", "clear" would have given me the same thought. Maybe blankMDC
? Change if you think that is more helpful or clear, if you don't think it adds anything feel free to ignore.
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.
Renamed to blankMDC
.
@@ -34,13 +34,13 @@ class VerificationRunner( | |||
} | |||
|
|||
if (statuses.anyStillRunning) { | |||
log.debug("Verification already running for {}", environment.name) | |||
log.debug("Verification already running for environment {} of application {}", environment.name, deliveryConfig.application) |
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.
ooo thank you thank you
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.
I hope this fixes things!!!!!!!!!
…aker#1845) * fix(tracing): Ensure clean MDC context at top coroutine scopes * fix(pr): Rename clearMDC to blankMDC per review * chore(logs): Improve log message for stale promotion checks Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Follow-up to #1841. Following the discussion and recommendations in Kotlin/kotlinx.coroutines#985, this PR adds an empty
MDCContext
to all top-level coroutine scopes wherewithTracingContext
is used, in an attempt to remove left-overX-SPINNAKER-RESOURCE-ID
s when switching threads.Hopefully fixes #1122.