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 <neskazu@gmail.com>
|
Is this expected to be stable from the start? |
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
no, I checked and I think most of it is under Development sections already, did find one place where it was missed: c68bba4 |
There was a problem hiding this comment.
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_severityfor severity-level filtering andtrace_basedfor trace-sampling-based filtering - Updates the
Enabledmethod to incorporate the new filtering criteria - Defines filtering logic for the
Emit a LogRecordoperation 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 ? |
### Traces - Restore `TraceIdRatioBased` and give it a deprecation timeline. Update recommended warnings based on feedback in issue [#4601](#4601). ([#4627](#4627)) - Changes of `TracerConfig.disabled` MUST be eventually visible. ([#4645](#4645)) - Remove text related to the former expermental probability sampling specification. ([#4673](#4673)) ### Metrics - Changes of `MeterConfig.disabled` MUST be eventually visible. ([#4645](#4645)) ### Logs - Add minimum_severity and trace_based logger configuration parameters. ([#4612](#4612)) - Changes of `LoggerConfig.disabled` MUST be eventually visible. ([#4645](#4645)) --------- Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com>
|
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: