Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upShow gomaxprocs on status page #1468
Comments
grobie
added
the
enhancement
label
Mar 8, 2016
fabxc
added
kind/enhancement
and removed
enhancement
labels
Apr 28, 2016
beorn7
added
the
component/ui
label
Nov 2, 2016
This comment has been minimized.
This comment has been minimized.
|
What other Go runtime information would be relevant, other than gomaxprocs? |
This comment has been minimized.
This comment has been minimized.
|
GOGC I guess. |
This comment has been minimized.
This comment has been minimized.
|
Prometheus stats like ingestion rate, chunk counts and time series would be useful. |
brian-brazil
added
the
priority/P3
label
Jul 14, 2017
brian-brazil
referenced this issue
Jul 14, 2017
Open
Show big and fat warning on web status page upon certain conditions. #1481
gouthamve
added
help wanted
low hanging fruit
labels
Jan 18, 2018
This comment has been minimized.
This comment has been minimized.
|
If no one is working on it, can i take it? |
This comment has been minimized.
This comment has been minimized.
|
Sure. |
serathius
referenced this issue
Mar 6, 2018
Merged
Add golang runtime information to status page. #3914
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil What's best way to access stats like chunk and time series counts? |
This comment has been minimized.
This comment has been minimized.
|
You'd need to add an API to get them from the TSDB. Ingestion rate will be a bit tricky, as that changes over time. |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil Is this ok? serathius@0873cc8 |
This comment has been minimized.
This comment has been minimized.
|
It feels dirty to use metrics like that. |
This comment has been minimized.
This comment has been minimized.
|
I agree. Do you know other less hacky method? |
This comment has been minimized.
This comment has been minimized.
|
Maybe track it more directly in the TSDB? |
This comment has been minimized.
This comment has been minimized.
|
Yes, we could track metric value in separate variable and always update it when metric is updated. But it creates second source of truth and would be hard to avoid breaking it in future. To contain dirty part of extracting value we could use function |
This comment has been minimized.
This comment has been minimized.
|
I added other runtime information to status page using |
This comment has been minimized.
This comment has been minimized.
|
@beorn7 What's your opinion on using metrics as shown in the above code example for use elsewhere? |
This comment has been minimized.
This comment has been minimized.
|
It's tempting to use metrics for that. However, one of the reasons for not providing "Getters" on metric types is to avoid encouraging exactly this usage pattern. My take so far was the following: If I have a need to track some value for use outside of metrics collection by Prometheus, I track that value completely outside of the Prometheus metrics library code. I then use https://godoc.org/github.com/prometheus/client_golang/prometheus#NewGaugeFunc or https://godoc.org/github.com/prometheus/client_golang/prometheus#NewCounterFunc to funnel that separately tracked value into the Prometheus metrics collection. Let's say (imaginary example!) I need to track the number of chunks because I want to throttle ingestion if it passes a certain threshold. I should not funnel that value through the Prometheus library. This would just be needlessly complex including a roundtrip of converting an int into a float and back. Sure, the Prometheus library conveniently wraps atomic increments and decrements, but that's really one line with the atomic package anyway. Note that this approach avoids the duplicated sources of truth mentioned in #1468 (comment) as the one source of truth is the separately tracked value, which is merely mirrored into the Prometheus universe at collection time with the GaugeFunc or CounterFunc. The use case for this issue is perhaps slightly different as you don't need those numbers for some internal use but to display a status page, which – arguably – is a curated and nicer looking human-readable version of |
This comment has been minimized.
This comment has been minimized.
|
That makes sense. There'll be other non-TSDB metrics we want (and also calculating some rates) so working from the default registry is probably what makes sense here. |
This comment has been minimized.
This comment has been minimized.
|
Using |
This comment has been minimized.
This comment has been minimized.
|
There's no namespaces in the proto, it's the same structure and data as what you're working with via WriteTo. |
This comment has been minimized.
This comment has been minimized.
|
Note that the |
serathius
referenced this issue
Mar 7, 2018
Merged
Add prometheus runtime information on status page #3921
brian-brazil
closed this
in
#3921
Mar 21, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
grobie commentedMar 8, 2016
It'd be helpful to have access to golang runtime information somewhere.