- 
                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_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 <[email protected]>
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: