-
Notifications
You must be signed in to change notification settings - Fork 960
Add trace_flags.sampled
context data entry to Log4j Core provider
#13774
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
Comments
I can of course provide a PR if the proposed solution is accepted. |
this format is part of the specification: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/logging_trace_context.md#overview it might be better to add support for this in fluentd instead of adding this to all opentelemetry logging instrumentation across all languages |
Thanks for the explanation. In such a case I believe I can close this feature request. @trask, to fully profit from the trace flags, it would be useful to have a custom Log4j Core filter to increase the logging verbosity, whenever |
I'm not sure I fully understand the proposal, could you open a new issue and outline? |
Done: #13804 |
Is your feature request related to a problem? Please describe.
Some structured log formats like the format accepted by FluentD
stackdriver
do not accept the W3Ctrace-flags
field, but expect each flag to be stored separately.Describe the solution you'd like
It would be useful to add an option to
opentelemetry-log4j-context-data-2.17-autoconfigure
to export each trace flag separately to the Log4j Core context data.Since currently there is only one flag defined, the custom context data provider could export an entry with name
trace_flags.sampled
and boolean value.Describe alternatives you've considered
Currently it is still rather easy to emulate the behavior of the
trace_flags.sampled
entry described above by replacing returningtrue
iftrace_flags
is01
andfalse
iftrace_flags
is00
. This workaround, however, will no longer work if the W3C defines additional trace flags.Additional context
No response
The text was updated successfully, but these errors were encountered: