Skip to content
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

Implement Logger.is_enabled #4410

Open
lmolkova opened this issue Feb 3, 2025 · 0 comments
Open

Implement Logger.is_enabled #4410

lmolkova opened this issue Feb 3, 2025 · 0 comments
Labels

Comments

@lmolkova
Copy link
Contributor

lmolkova commented Feb 3, 2025

Spec defines basic Logger.Enabled method which is now can be enabled/disabled per scope with config.

Filtering by severity and sampling are coming via open-telemetry/opentelemetry-specification#4290.

Having this API now (even before filtering/sampling is finalized in the spec) would help instrumentation to avoid doing potentially expensive operations when logging is not even configured, but also they can start leveraging is_enabled now and don't need to change when SDK starts supporting all the interesting cases behind it.

Related to open-telemetry/opentelemetry-python-contrib#3226 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant