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

runtime instrument type #368

Closed
seankhliao opened this issue Sep 25, 2020 · 4 comments
Closed

runtime instrument type #368

seankhliao opened this issue Sep 25, 2020 · 4 comments
Labels
instrumentation: runtime question Further information is requested

Comments

@seankhliao
Copy link

My setup was a fairly simple one, expecting more or less the equivalent metrics from prometheus http.Handle("/prommetrics", promhttp.Handler()) for the go runtime.

	promExporter, _ := prometheus.InstallNewPipeline(prometheus.Config{})
	otelruntime.Start()
	http.Handle("/otelmetrics", promExporter)

The metrics recorded by runtime are of type metric.Int64UpDownSumObserver, which is additive, resulting in numbers that are out of place (eg 200k goroutines, 60GiB of allocated memory on a machine with 2GiB, ...) and graphs that look like

2020-09-25-190457

Whereas I was expecting the (in my opinion more useful):

2020-09-25-190629

The information read from go's stdlib provides a snapshot of the current go runtime state, and I was expecting this to be reflected in the metrics; instead, with the current behaviour, it will monotonically increase and to get the stats from a point in time requires the use of rate() or similar, losing resolution. The use of metric.Int64UpDownSumObserver indicates that the value is intended to go down at some point in time, but in current usage it never will

@jmacd
Copy link
Contributor

jmacd commented Sep 28, 2020

We need to do something in the specification about this. Since Prometheus does not support UpDownSumObserver semantics, the Prometheus exporter should convert these to Gauge. There is a related OTEP here: open-telemetry/oteps#118, but it does not state this specifically and it is mired in issues related to histogram vs gauge, not counter vs gauge. 😀

I will file a corresponding issue in the main repository.

@jmacd
Copy link
Contributor

jmacd commented Sep 28, 2020

Thanks @seankhliao. It looks fairly straightforward to fix this support in the Prometheus exporter.
open-telemetry/opentelemetry-go#1210

@seankhliao
Copy link
Author

thanks for looking into this

@MrAlias MrAlias added priority:p3 question Further information is requested labels Oct 1, 2020
@MrAlias MrAlias added this to the RC1 milestone Oct 1, 2020
@MrAlias MrAlias removed this from the RC1 milestone Feb 18, 2021
plantfansam referenced this issue in plantfansam/opentelemetry-go-contrib Mar 18, 2022
@MrAlias MrAlias moved this to Backlog in Go: Metric SDK (Post-GA) Nov 4, 2022
@MrAlias MrAlias moved this from Needs Triage to TODO in Go: Metric SDK (Post-GA) Feb 8, 2024
@MrAlias
Copy link
Contributor

MrAlias commented Oct 17, 2024

It seems like open-telemetry/opentelemetry-go#1210 resolved this. Closing.

@MrAlias MrAlias closed this as completed Oct 17, 2024
@pellared pellared closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
instrumentation: runtime question Further information is requested
Projects
Development

No branches or pull requests

4 participants