Stabilize Enabled API for synchronous instruments#4746
Merged
reyang merged 9 commits intoopen-telemetry:mainfrom Dec 2, 2025
Merged
Stabilize Enabled API for synchronous instruments#4746reyang merged 9 commits intoopen-telemetry:mainfrom
reyang merged 9 commits intoopen-telemetry:mainfrom
Conversation
jmacd
approved these changes
Nov 25, 2025
MrAlias
approved these changes
Nov 25, 2025
Member
Author
Will do as a separate PR (baby steps 😉). |
dashpole
approved these changes
Nov 25, 2025
reyang
reviewed
Nov 25, 2025
trask
approved these changes
Nov 25, 2025
reyang
approved these changes
Nov 25, 2025
jsuereth
approved these changes
Dec 1, 2025
lmolkova
approved these changes
Dec 2, 2025
Merged
This was referenced Dec 8, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 12, 2025
### Context - Make the W3C randomness flag required. ([#4761](#4761)) ### Traces - Deprecate Zipkin exporter document and make exporter implementation optional. ([#4715](#4715)) - Add spec for `AlwaysRecord` sampler ([#4699](#4699)) ### Metrics - Stabilize `Enabled` API for synchronous instruments. ([#4746](#4746)) - Allow instrument `Enabled` implementation to have additional optimizations and features. ([#4747](#4747)) ### Logs - Stabilize `LogRecordProcessor.Enabled`. ([#4717](#4717)) ### SDK Configuration - Clarifies that guidance related to boolean environment variables is not applicable to other configuration interfaces. ([#4723](#4723)) --------- Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 16, 2025
Per #4746 (review) Side note. I also made sure that this wording used for all signals (and in the same place) > It is not necessary for implementations to ensure that changes to any of these parameters are immediately visible to callers of `Enabled`. However, the changes MUST be eventually visible. so that the spec is similar for all signals --------- Co-authored-by: Carlos Alberto Cortez <calberto.cortez@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4215
Current implementation status:
xpackage: “Instrument Enabled synchronous instruments provide an Enabled method.” See the Go package docs. (1)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)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.