-
Notifications
You must be signed in to change notification settings - Fork 867
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
Disabling Attributes logging not working #12431
Comments
Transferring to |
hi @AntonioLyubchev!
can you try with normal configuration (not the new experimental yaml configuration)? thanks |
Hi! I completely removed the experimental logback config from the yaml and it seems that I am still getting these log attributes: EDIT: Ah.. it seems it is enabled by default I will try to overwrite it but it seems it's not working. At first glance, it seems that overwriting is not implemented at all addOpenTelemetryAppender() calls initializeOpenTelemetryAppenderFromProperties() which does not touch at all If I am on the right track, I can try to create a PR :) |
The Java agent disables the argument capture by default: Line 41 in 8a10097
I would say that the OpenTelemetry starter should have the same behavior as the Java agent. The documention of the OpenTelemetry Logback appender says that the argument capture is disabled by default (and is not consistent with the implementation): https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/logback/logback-appender-1.0/library |
As a workaround, you could disable the capture of the log attributes from a Logback XML file: <appender name="OpenTelemetry" class="io.opentelemetry.instrumentation.logback.appender.v1_0.OpenTelemetryAppender">
<captureArguments>false</captureArguments>
</appender> |
Thank you for identifying the issue and providing the workaround. |
Resolved with #12445 |
Describe the bug
This relates to #6772 and the setup/environment is the same
Having disabled all additional parameters under logback-appender:
and explicitly excluded "log.body.parameters,log.body.template":
After logging a message:
log.info("Service B about to call HelloService to do work that {}.", Boolean.TRUE.equals(fail) ? "fails" : "succeeds");
I end up with the following in Elastic:
I expect that:
Attributes.log.body.parameters
Attributes.log.body.template
would not be present in the structured JSON log.
Additional context
Full config yaml:
Class producing the log:
The text was updated successfully, but these errors were encountered: