Skip to content

stabilize logger.enabled #1563

@brettmc

Description

@brettmc

open-telemetry/opentelemetry-specification#4208 from spec 1.44.0

https://github.com/open-telemetry/opentelemetry-specification/blob/v1.44.0/specification/logs/api.md#enabled

To help users avoid performing computationally expensive operations when generating a LogRecord, a Logger SHOULD provide this Enabled API.
The API SHOULD accept the following parameters:
The Context to be associated with the LogRecord. When implicit Context is supported, then this parameter SHOULD be optional and if unspecified then MUST use current Context. When only explicit Context is supported, accepting this parameter is REQUIRED.
Severity Number (optional)
This API MUST return a language idiomatic boolean type. A returned value of true means the Logger is enabled for the provided arguments, and a returned value of false means the Logger is disabled for the provided arguments.
The returned value is not always static, it can change over time. The API SHOULD be documented that instrumentation authors needs to call this API each time they emit a LogRecord to ensure they have the most up-to-date response.

Metadata

Metadata

Assignees

Labels

Work In ProgressThis is a Work in Progress, not ready to be merged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions