sdk/log: Bring back Processor.Enabled #5938
Labels
area:logs
Part of OpenTelemetry logs
blocked:specification
Waiting on clarification of the OpenTelemetry specification before progress can be made
enhancement
New feature or request
pkg:SDK
Related to an SDK package
Problem Statement
The processor's Enabled should also have instrumentation scope and resource as input to e.g. control whether a logger is enabled or not based on logger name.
See: open-telemetry/opentelemetry-specification#4207 (comment)
Proposed Solution
Bring back
Enabled
toProcessor
interface and addEnabledParameters
type insdk/log
that additionally hasResource
andInstrumentationScope
getters.Additional Context
There is a desire in the specification to not stabilize Logger.Enabled API before SDK specifies how it is handled. Therefore, I think we should simply add this functionality and also work on specifying how SDK handles Logger.Enabled.
If I remember correctly, we landed #5692 as we thought that Logger.Enabled would be stabilized in a timely manner which is not happening. I find going back and forth a little annoying. However, I do not see chances to make a v1 of OTel Go Logs in near future, therefore we do not need
/x
. I also think that exposing this functionality gives us higher chances to receive feedback from users. I also hope that it would also increase the chances to progress with open-telemetry/opentelemetry-specification#4207 as we would support Logger.Enabled in our SDK out-of-the-box.The text was updated successfully, but these errors were encountered: