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

logging middleware: log trace_id only if sampled #529

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

npazosmendez
Copy link
Contributor

@npazosmendez npazosmendez commented Jun 7, 2024

What this PR does:

Which issue(s) this PR fixes:

Fixes #

Checklist

  • Tests updated
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's been annoying me as well. Thanks for fixing it

@pstibrany
Copy link
Member

Unsampled trace ID can still be used for correlating related logs for the same request. It's annoying, but useful. Perhaps we could indicate unsampled traceID in some other way?

@npazosmendez npazosmendez marked this pull request as ready for review June 7, 2024 18:25
Copy link
Member

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@pstibrany pstibrany merged commit c73f165 into main Jun 10, 2024
6 checks passed
@pstibrany pstibrany deleted the njpm/log-mw-traceid-only-if-sampled branch June 10, 2024 10:26
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

Successfully merging this pull request may close these issues.

3 participants