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

kamon-system-metrics: Use gauge instead of histogram for memory metrics #1233

Open
jatcwang opened this issue Dec 8, 2022 · 2 comments
Open

Comments

@jatcwang
Copy link
Contributor

jatcwang commented Dec 8, 2022

Does it make more sense to use a gauge rather than histogram for metrics like jvm.memory.used, jvm.memory.free as they aren't high frequency metrics (collected every second by default)?

Will raise a PR if you agree :)

@ivantopo
Copy link
Contributor

We might want to change it in Kamon 3.x because this would be a breaking change. But, assuming that you are asking this because of Prometheus, you could turn those metrics into gauges via config on the Prometheus reporter:

gauges {
# Names of the histogram, timer and range sampler metrics that shall be exported as a gauges as well.
# For each matching metric there will be three gauges representing the current seen distribution (min, max, avg)
# All patterns are treated as Glob patterns.
metrics = [
# example:
# "http.server*",
# "*akka*"
]
}

@jatcwang
Copy link
Contributor Author

Cool thanks. For metrics jvm.memory.used I think we want the last polled value instead of min/max/avg, so I guess we'll wait for Kamon 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants