-
Notifications
You must be signed in to change notification settings - Fork 850
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
Add experimental synchronous gauge #5506
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 🚀
Codecov ReportPatch coverage is 📢 Thoughts on this report? Let us know!. |
The corresponding spec PR for this feature has been merged and I've marked this PR as "Ready for Review"! |
…y-java into sync-gauge-prototype
*/ | ||
void set(double value, Attributes attributes); | ||
|
||
// TODO(jack-berg): should we add overload with Context argument? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to open an issue for this and solve in a separate PR. The synchronous use cases I'm aware of require the instrumentation to subscribe to notifications about change in some value, rather than fetching the current value which caters to async gauge. Not clear when context would be available in one of these notification event streams. I'm open to it being a use case, but its not as clear cut as what's in this PR.
@jkwatson planning on merging this for 1.30.0 release unless you have any reservations. |
Hi @jack-berg, I can't find a way to use the synchronous gauge with a public API. Do you have any working example to share? Currently I have to use reflexion to be able to use it. It's working but not so nice :) |
@MickaelCoquer The synchronous gauge API is currently experimental and part of the Using APIs in the incubator is a bit awkward:
Once the specification stabilizes, we'll promote the API to |
This is awesome work, thanks for implementing a synchronous API. We need to use this in production and are trying to decide whether to use the experimental API or not. Do you know how long these kinds of things typically take ?. |
Hi @jack-berg, I get a class cast exception:
with this example: LongGauge gauge = ((ExtendedLongGaugeBuilder) GlobalOpenTelemetry.getMeter("default")
.gaugeBuilder("gauge")
.ofLongs())
.build(); The same happens if I use a custom meter provider and try to cast from an instance of Does this implementation not work with certain versions of the libraries? |
Hi @GabrielMulcahy, can you open a new issue to make sure your question is seen? Thanks |
I met the same issue : #6378 |
Adds experimental synchronous gauge, as described in spec PR #3540.