Skip to content

Conversation

@pellared
Copy link
Member

@pellared pellared commented Nov 21, 2025

Fixes #4215

Current implementation status:

Language Status Where it is / code reference
Go Yes (experimental) Implemented on synchronous instruments in the SDK’s experimental x package: “Instrument Enabled synchronous instruments provide an Enabled method.” See the Go package docs. (1)
.NET Yes (in BCL) Use System.Diagnostics.Metrics.Instrument.Enabled: “Gets a value that indicates if there are any listeners for this instrument.” This is the .NET runtime Metrics API that OpenTelemetry .NET uses. (2)
Java Yes (incubator) Implemented on synchronous instruments in the incubator API. (3)
JavaScript No
Python No
C++ No
Rust No
Ruby No
PHP No
Swift No
Erlang/Elixir No

Note that @open-telemetry/collector-maintainers would benefit from making it stable and would not have to do things like https://github.com/open-telemetry/opentelemetry-collector/blob/2e9c82787618ea7da3fada176abb45b5a30714bf/service/internal/obsconsumer/enabled.go.

@pellared pellared marked this pull request as ready for review November 21, 2025 19:37
@pellared pellared requested review from a team as code owners November 21, 2025 19:37
@pellared pellared changed the title Stabilize Enabled for synchronous instruments Stabilize Enabled API for synchronous instruments Nov 25, 2025
Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight preference towards also updating corresponding sdk spec to mixed stability, with the view part stable and the meterconfig part still in development.

@pellared
Copy link
Member Author

pellared commented Nov 25, 2025

Slight preference towards also updating corresponding sdk spec to mixed stability, with the view part stable and the meterconfig part still in development.

Will do as a separate PR (baby steps 😉).

@reyang reyang added this pull request to the merge queue Dec 2, 2025
Merged via the queue into open-telemetry:main with commit ca7e892 Dec 2, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stabilize Metrics Instrument Enabled

10 participants