Description
Problem Statement
The Collector SIG is blocked on having Instrument.Enabled
available on the OpenTelemetry Go libraries for stabilizing the component
package (see open-telemetry/opentelemetry-collector/issues/11061).
Adding this to the API is blocked by open-telemetry/opentelemetry-specification/issues/4215, which is moving slowly. We would like to have it available at the SDK level instead.
Proposed Solution
We can use #5768 as a start and add this as an SDK-only, 'hidden' method:
- The method should be named Enabled
- It should not have EnabledOptions/EnabledParameters since that would mean exposing experimental public API
- We should not add it to the API interfaces yet
- This needs to be updated in the PR: https://github.com/open-telemetry/opentelemetry-go/tree/main/sdk/metric/internal/x using this for reference: https://github.com/open-telemetry/opentelemetry-go/blob/main/sdk/log/internal/x/README.md
Alternatives
Just wait.
Prior Art
We have both https://github.com/open-telemetry/opentelemetry-go/tree/main/sdk/metric/internal/x and https://github.com/open-telemetry/opentelemetry-go/blob/main/sdk/log/internal/x/README.md as prior examples of experimental methods/stuff.
Additional Context
Spoke about this with @pellared
Metadata
Metadata
Labels
Type
Projects
Status