-
Notifications
You must be signed in to change notification settings - Fork 888
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 Enabled method to Logger #4020
Conversation
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.
Nice! Was coincidentally just working on a local branch for this. I think we ought to have symmetry across metrics and traces, but fine pursuing that in a separate PR.
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.
LGTM. Thanks @MrAlias!
Do not specify required parameters, but explain they can be added in the future.
Per #4020 (comment) Some people confuse SHALL with SHOULD. --------- Co-authored-by: Reiley Yang <[email protected]>
Leave the return value implementation for implementations specification.
Re-requested review from @jack-berg and @reyang as the contents have changed since their approvals. |
…#4063) Builds off #4020 to extend the `Enabled` API to `Tracer` and metrics `Instrument`. Adds language to Log SDK, Metrics SDK, and Trace SDK for how scope config is used to resolve the `Enabled` operation. This was discussed in #3867 but punted on in #3877 as [discussed here](#3877 (comment)). --------- Co-authored-by: Robert Pająk <[email protected]> Co-authored-by: Trask Stalnaker <[email protected]> Co-authored-by: Reiley Yang <[email protected]>
Per open-telemetry#4020 (comment) Some people confuse SHALL with SHOULD. --------- Co-authored-by: Reiley Yang <[email protected]>
…open-telemetry#4063) Builds off open-telemetry#4020 to extend the `Enabled` API to `Tracer` and metrics `Instrument`. Adds language to Log SDK, Metrics SDK, and Trace SDK for how scope config is used to resolve the `Enabled` operation. This was discussed in open-telemetry#3867 but punted on in open-telemetry#3877 as [discussed here](open-telemetry#3877 (comment)). --------- Co-authored-by: Robert Pająk <[email protected]> Co-authored-by: Trask Stalnaker <[email protected]> Co-authored-by: Reiley Yang <[email protected]>
Fixes #3917
Knowing if a
LogRecord
will be dropped prior to performing computationally expensive operations helps developers using the Logs Bridge API avoid wasted and expensive work. This adds andEnabled
API to theLogger
to provide this functionality.This is related to #3877. In that PR
Loggers
may become entirely disabled. TheEnabled
method included here will help users determine this state.Prototypes