You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reviewer note: new LogRecordProcessor.enabled hook is non-abstract (default True) so existing custom processors are unaffected; SDK enabled = not-disabled AND any-processor-enabled (False when no processors).
📣 Public-facing draft — to be opened upstream in open-telemetry/opentelemetry-python. No internal references; copy verbatim.
Title: Logs API/SDK: Logger is missing the public Enabled operation
Description
The Logs API Logger has no public Enabled operation, and the SDK Logger only exposes a private, parameter-less _is_enabled() that ignores context, severity, and event name.
Evidence:
API Logger (opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py) defines emit(...) but no enabled method.
SDK Logger._is_enabled() (opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py) returns only self._logger_config.is_enabled, taking no arguments.
Spec
Logs API, "Logger's Enabled Operation": accepts the LogRecord Context (optional, implicit context), Severity Number (optional), and Event Name (optional), and MUST return a language-idiomatic boolean — true = enabled for the arguments. It is an optional performance optimization so callers can avoid constructing a LogRecord that would be dropped.
Reference
Go: sdk/log/logger.go — Enabled(ctx, log.EnabledParameters) bool, returning true if any processor is enabled; the Go no-op logger returns false.
Java: Logger.isEnabled(...).
Proposed fix
Add a public enabled(context=None, severity_number=None, event_name=None) -> bool to the API Logger (no-op default False) and implement it in the SDK Logger, delegating to a processor-level Enabled hook (any-enabled wins; disabled when no processors) while honoring the logger configuration.
Activity
ocelotl commentedon Jul 22, 2026
🔒 Internal (dash0) — not for upstream.
Tracking for the Logs API/SDK Logger.enabled operation.
oss_22_logger_enabled20892331d· PR: oss_22_logger_enabled #26LogRecordProcessor.enabledhook is non-abstract (default True) so existing custom processors are unaffected; SDKenabled= not-disabled AND any-processor-enabled (False when no processors).ocelotl commentedon Jul 22, 2026
📣 Public-facing draft — to be opened upstream in
open-telemetry/opentelemetry-python. No internal references; copy verbatim.Title: Logs API/SDK:
Loggeris missing the publicEnabledoperationDescription
The Logs API
Loggerhas no publicEnabledoperation, and the SDKLoggeronly exposes a private, parameter-less_is_enabled()that ignores context, severity, and event name.Evidence:
Logger(opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py) definesemit(...)but noenabledmethod.Logger._is_enabled()(opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py) returns onlyself._logger_config.is_enabled, taking no arguments.Spec
Logs API, "Logger's Enabled Operation": accepts the LogRecord
Context(optional, implicit context),Severity Number(optional), andEvent Name(optional), and MUST return a language-idiomatic boolean —true= enabled for the arguments. It is an optional performance optimization so callers can avoid constructing aLogRecordthat would be dropped.Reference
sdk/log/logger.go—Enabled(ctx, log.EnabledParameters) bool, returning true if any processor is enabled; the Go no-op logger returnsfalse.Logger.isEnabled(...).Proposed fix
Add a public
enabled(context=None, severity_number=None, event_name=None) -> boolto the APILogger(no-op defaultFalse) and implement it in the SDKLogger, delegating to a processor-levelEnabledhook (any-enabled wins; disabled when no processors) while honoring the logger configuration.ocelotl commentedon Sep 8, 2026
Fixed in open-telemetry#5380