-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Question] Prometheus Gauge in OpenTelemetry? #1139
Comments
Ah, now that I see your example, the You'll have fewer goroutines and arbitrary sleep statements then. See open-telemetry/opentelemetry-specification#834 |
Thanks for the reply @jmacd ! I'm still not able to achieve it though... I feel like my approach to this is wrong 🤔 . Can you take a look ? Given :
This renders:
|
This is probably because Prometheus exporter is using simple selector:
which uses histogram distribution for opentelemetry-go/sdk/metric/selector/simple/simple.go Lines 127 to 128 in c9726ef
The workaround for now is to implement a custom selector which uses "LastValue" aggregation for ValueObserver, this is what we did in Cloud Monitoring. |
Talking about this in the SIG meeting today the proposal put forth was to include a selector similar to what @nilebox showed was done in the Google Cloud Monitoring exporter in the main project. Additionally add the functionality to the prometheus and cortext exporters to be configured with a user defined selector. That way, even though the default will still be the Histogram selector, it will allow users to solve this problem in a more standard way. It was also brought up that this is likely something the Views API is well suited to address. The long-term solution would be to address this configuration there. |
Hi !
Similar to #708 I'm trying to model a Gauge using otel-go.
Finding it hard to wrap my head around it, can someone shine some light on this?
The results seem to be accumulative either way I do it 🤔
Using prometheus client:
Using otel-go:
Rendering:
Thanks! 😃
The text was updated successfully, but these errors were encountered: