-
Notifications
You must be signed in to change notification settings - Fork 214
Description
open-telemetry/opentelemetry-specification#4208 from spec 1.44.0
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.