Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that enabled applies to synchronous instruments #4211

Merged

Conversation

codeboten
Copy link
Contributor

@codeboten codeboten commented Sep 12, 2024

Fix #4200

Changes

The Enabled API is only to be applied to synchronous instruments.

For non-trivial changes, follow the change proposal process.

The Enabled API is only to be applied to synchronous instruments.

Fix open-telemetry#4200

Signed-off-by: Alex Boten <[email protected]>
@codeboten codeboten requested review from a team September 12, 2024 18:20
@codeboten codeboten changed the title clarify that enabled applies to synchronous instruments Clarify that enabled applies to synchronous instruments Sep 12, 2024
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

Fix #4200

is this part of #4200 addressed somewhere already? thanks

There is a missed opportunity for an even more important optimization which is to not call the async (which I think lots of the SDK do today anyway) callback if the async instrument is NOT Enabled.

specification/metrics/api.md Outdated Show resolved Hide resolved
@codeboten
Copy link
Contributor Author

There is a missed opportunity for an even more important optimization which is to not call the async (which I think lots of the SDK do today anyway) callback if the async instrument is NOT Enabled.

I'm not sure that it's called out anywhere, this PR addresses:

What did you expect to see?

The Enabled functionality should apply only for the sync instruments.

@reyang
Copy link
Member

reyang commented Sep 13, 2024

There is a missed opportunity for an even more important optimization which is to not call the async (which I think lots of the SDK do today anyway) callback if the async instrument is NOT Enabled.

This sounds like SDK implementation bugs/improvements to me rather than a spec issue.

@codeboten
Copy link
Contributor Author

Anything else needed for this one or can it be merged?

@reyang reyang merged commit 0a87e2f into open-telemetry:main Sep 18, 2024
6 checks passed
@codeboten codeboten deleted the codeboten/enabled-sync-instruments branch September 18, 2024 16:11
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
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.

Clarify Instrument.Enabled applies only for sync instruments
7 participants