-
Notifications
You must be signed in to change notification settings - Fork 933
Add minimum_severity
and trace_based
logger configuration parameters
#4612
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 minimum_severity
and trace_based
logger configuration parameters
#4612
Conversation
This does not support having different minimum severity levels for different processors (processing pipelines). From open-telemetry/opentelemetry-go-contrib#7549:
CC @codeboten It is possible to achieve the functionality of "logger configurator" using processors (e.g. logger filter). The question is whether we need a configuration option that is redundant? Moreover, using processors it is possible to compose more complex pipelines that are not possible using the logger configurator. It should be possible to "implement" the declarative config of logger configurator using processors. Then the logger configurator would be a facade for configuring some processors. PS.I think there were some similar/related discussions here #4439 If we are looking into simplicity then another alternative (mainly for |
Seems like there is a consensus to go forward with this proposal. It looks like Collector already handles filtering using filterprocessor. |
We discussed this during Go SIG meeting. CC @open-telemetry/go-triagers |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Co-authored-by: Liudmila Molkova <[email protected]>
Is this expected to be stable from the start? |
Co-authored-by: Robert Pająk <[email protected]>
Co-authored-by: Robert Pająk <[email protected]>
Co-authored-by: Robert Pająk <[email protected]>
no, I checked and I think most of it is under Development sections already, did find one place where it was missed: c68bba4 |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces fine-grained logger configuration capabilities by adding minimum_severity
and trace_based
filtering parameters to the logger configuration system. This allows for more sophisticated log filtering strategies beyond simple enable/disable toggles.
- Adds two new configuration parameters:
minimum_severity
for severity-level filtering andtrace_based
for trace-sampling-based filtering - Updates the
Enabled
method to incorporate the new filtering criteria - Defines filtering logic for the
Emit a LogRecord
operation to ensure consistent behavior
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Maybe have a last look @codeboten @open-telemetry/configuration-approvers ? |
Alternative to #4611
Some related prior discussions:
Java POC @ open-telemetry/opentelemetry-java#7529
Declarative config for this is a bit nicer than in #4611, also supports applying different minimum severity levels to different loggers: