Skip to content

Implement Logger.is_enabled #4410

Closed
Closed

Description

@lmolkova

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)

Activity

  1. lmolkova commented on Jun 25, 2026

    @lmolkova
    MemberAuthor

    Closing as dup of #5360

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions