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

Support synchronous gauge #5225

Closed
yizhang81 opened this issue Apr 18, 2024 · 3 comments · Fixed by #5304
Closed

Support synchronous gauge #5225

yizhang81 opened this issue Apr 18, 2024 · 3 comments · Fixed by #5304
Assignees
Labels
area:metrics Part of OpenTelemetry Metrics enhancement New feature or request
Milestone

Comments

@yizhang81
Copy link

Problem Statement

From specification, gauge can be synchronous or asynchronous.

Gauge is a synchronous Instrument which can be used to record non-additive value(s) (e.g. the background noise level - it makes no sense to record the background noise level value from multiple rooms and sum them up) when changes occur.

Proposed Solution

Can we add support for sync gauge?

@yizhang81 yizhang81 added the enhancement New feature or request label Apr 18, 2024
@pellared
Copy link
Member

I am just adding a reference to a potential workaround before it is done: #3984 (comment)

@MrAlias
Copy link
Contributor

MrAlias commented Apr 18, 2024

We plan to add this to our API once it becomes stable.

This is in an experimental state in the specification. We cannot add something to our stable API that can change.

Until that time, the work-around posted by @pellared should be used.

@MrAlias MrAlias added the blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made label Apr 18, 2024
@MrAlias
Copy link
Contributor

MrAlias commented May 1, 2024

PoC: #5280

@MrAlias MrAlias added area:metrics Part of OpenTelemetry Metrics and removed blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made labels May 1, 2024
@MrAlias MrAlias added this to the v1.27.0 milestone May 1, 2024
@MrAlias MrAlias self-assigned this May 6, 2024
MrAlias added a commit that referenced this issue May 16, 2024
Resolve #5225 

The specification has [added a synchronous gauge
instrument](open-telemetry/opentelemetry-specification#3540).
That instrument has now been
[stabilized](open-telemetry/opentelemetry-specification#4019),
and that stabilization is included in the [next
release](open-telemetry/opentelemetry-specification#4034).

This adds the new synchronous gauge instrument to the metric API and all
implementation we publish.

This change will be a breaking change for any SDK developer. The
`embedded` package is updated to ensure our compatibility guarantees are
meet.

---------

Co-authored-by: David Ashpole <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants