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

Add 'trace_flags' to logging MDC #2312

Merged

Conversation

mateuszrzeszutek
Copy link
Member

Resolves #2304

  • Remove 'sampled' flag
  • Rename MDC keys to the current logging spec convention: trace_id instead of traceId

I'll update the logging doc after release.

* Remove 'sampled' flag
* Rename MDC keys to the current logging spec convention: trace_id instead of traceId
mateuszrzeszutek pushed a commit to mateuszrzeszutek/opentelemetry-java-instrumentation that referenced this pull request Feb 17, 2021
mateuszrzeszutek pushed a commit to mateuszrzeszutek/opentelemetry-java-instrumentation that referenced this pull request Feb 17, 2021
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

I'm good with this change, or with the existing java-style MDC property names (traceId, spanId, traceFlags).

@mateuszrzeszutek
Copy link
Member Author

I'm good with this change, or with the existing java-style MDC property names (traceId, spanId, traceFlags).

Some more explanation for my changes: I think that trace_id is a bit more consistent, we use the same name everywhere - and if somebody chooses to log the whole MDC (just use %X pattern) they'll get something like trace_id=12313445 ... by default.

@anuraaga anuraaga merged commit f127a97 into open-telemetry:main Feb 18, 2021
@mateuszrzeszutek mateuszrzeszutek deleted the use-trace-flags-in-logs branch February 18, 2021 08:14
trask pushed a commit that referenced this pull request Feb 21, 2021
@kazuki43zoo
Copy link

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.

Add traceFlags to logging MDC instead of sampled boolean
5 participants