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
Implement the remaining, Development-status conditions of the Logs Enabled spec in the SDK: severity-based filtering (minimum_severity) and trace-based filtering (trace_based).
Background
PR #5380 adds Logger.enabled() and implements the stable conditions of the spec's Enabled section:
there are no registered LogRecordProcessors
LoggerConfig.enabled is false (handled in Logger.enabled())
all registered LogRecordProcessors implement Enabled and each returns false
The spec lists two further conditions under which Enabled MUST return false, both currently marked [Development]:
the provided severity is specified (not 0) and is less than the configured minimum_severity
trace_based is true and the current context is associated with an unsampled trace
Both conditions are still Development status in the spec and subject to change.
_LoggerConfig currently only has is_enabled; these conditions require adding minimum_severity and trace_based fields to the config model first. The tracer analog _TracerConfig also only has is_enabled, so the config model should grow consistently across signals (related: Public API for setting logger/tracer configuration programmatically #5524).
Proposed scope
Add minimum_severity and trace_based fields to _LoggerConfig.
Have Logger.enabled() return false when the provided severity is below minimum_severity, and when trace_based is set and the current context is an unsampled trace.
Track the spec closely, since these conditions are Development status.
Hi, I'd be interested in working on this. Since "minimum_severity" and "trace_based" require extending "_LoggerConfig", is this ready for implementation as proposed, or should it wait on the configuration work in #5524?
Hi, I'd be interested in working on this. Since "minimum_severity" and "trace_based" require extending "_LoggerConfig", is this ready for implementation as proposed, or should it wait on the configuration work in #5524?
this one does not need to wait on #5524, the real dependency is #5380 (which is pretty much ready to be merged). Are you still interested in working on this issue? if not I can take it ✌️
Yep, I’m still interested in working on this! Thanks for clarifying the dependency. I’ll base the work on #5380 and start looking into adding minimum_severity and trace_based to _LoggerConfig along with the corresponding Logger.enabled() behavior. Thank You!
Activity
djbell261 commentedon Aug 21, 2026
Hi, I'd be interested in working on this. Since "minimum_severity" and "trace_based" require extending "_LoggerConfig", is this ready for implementation as proposed, or should it wait on the configuration work in #5524?
ocelotl commentedon Sep 7, 2026
hey @djbell261 thanks for offering
this one does not need to wait on #5524, the real dependency is #5380 (which is pretty much ready to be merged). Are you still interested in working on this issue? if not I can take it ✌️
djbell261 commentedon Sep 10, 2026
Yep, I’m still interested in working on this! Thanks for clarifying the dependency. I’ll base the work on #5380 and start looking into adding
minimum_severityandtrace_basedto_LoggerConfigalong with the correspondingLogger.enabled()behavior. Thank You!