-
Notifications
You must be signed in to change notification settings - Fork 931
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
base: main
Are you sure you want to change the base?
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]>
If a log record's [SeverityNumber](./data-model.md#field-severitynumber) is | ||
specified and less than the configured `minimum_severity`, the log record MUST | ||
be dropped by the `Logger`. Log records with an unspecified severity or severity set to `0` SHOULD NOT be | ||
affected by this parameter by default. |
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.
affected by this parameter by default. | |
affected by this parameter. |
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.
see @lmolkova's concern here: #4612 (comment)
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.
I assume @pellared's point is that SHOULD NOT
is permissive enough so that by default
is redundant. I still feel that 'by default' makes spec easier to read and explains intent for it to be configurable down the road, but if anyone feels strong about removing it, go ahead, I don't mind.
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.
@lmolkova check out #4612 (comment)
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.
good catch!
Log records with an unspecified severity or severity set to
0
MUST NOT be affected by this parameter.
sounds too restrictive - like we would never drop records with 0 severity (and would never have config option for it) - I don't want to close this door.
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.
sounds too restrictive - like we would never drop records with 0 severity (and would never have config option for it) - I don't want to close this door.
I do not agree. This is only describing the behavior of minimum_severity
parameter.
MUST NOT be affected by this parameter.
We can introduce another parameter in future e.g. drop_unset_severity
if users want to drop log records with unspecified severity level. The behavior of minimum_severity
should be consistent in all SDKs.
Is this expected to be stable from the start? |
be dropped by the `Logger`. Log records with an unspecified severity or severity set to `0` SHOULD NOT be | ||
affected by this parameter by default. | ||
|
||
* `trace_based`: A boolean indication of whether the logger should |
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.
Maybe a more explicit name? is trace_sample_based
too mouthful? Not a strong feeling but trace_based
may not be clear/obvious for new users.
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.
there was some prior discussion around this name: #4290 (comment)
though certainly we can change it if others feel similarly
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 |
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: