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

Update Log4j appender example to follow the spec #5443

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

arminru
Copy link
Member

@arminru arminru commented Feb 24, 2022

In https://github.com/open-telemetry/opentelemetry-specification/blob/v1.9.0/specification/logs/overview.md#trace-context-in-legacy-formats the spec defines how a Trace Context should be represented for logging in text formats:

OTEP0114 defines how the trace context should be recorded in logs.
To summarize, the following field names should be used in legacy formats:

  • "trace_id" for TraceId, hex-encoded.
  • "span_id" for SpanId, hex-encoded.
  • "trace_flags" for trace flags, formatted according to W3C traceflags format.

I adapted the keys in the example provided in the Log4j appender readme to match that.

@arminru arminru requested a review from a team February 24, 2022 12:01
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.

thx!

@trask trask merged commit 640e95d into open-telemetry:main Feb 24, 2022
@arminru arminru deleted the log4j-readme-keys branch February 24, 2022 20:38
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
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