-
Notifications
You must be signed in to change notification settings - Fork 13
Memory gauges report null when data is unavailable #1392
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
Conversation
Previously the default `-1` values were used, resulting in confusing dashboards that didn't make it obvious the data was unavailable.
Generate changelog in
|
| + memoryBean.getNonHeapMemoryUsage().getMax()); | ||
| metrics.totalInit( | ||
| (NonNegativeGauge) () -> memoryBean.getHeapMemoryUsage().getInit() | ||
| + memoryBean.getNonHeapMemoryUsage().getInit()); |
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.
are these computations problematic if one or both are not available?
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.
Probably worth checking both, in practice they’re all or nothing in my experience, but that could change.
See the confusing failures with no source location on palantir/tritium#1392 due to assertions on Gauge values.
| metrics.totalInit((Gauge<Long>) () -> { | ||
| long heap = memoryBean.getHeapMemoryUsage().getInit(); | ||
| long nonHeap = memoryBean.getNonHeapMemoryUsage().getInit(); | ||
| return (heap < 0 || nonHeap < 0) ? null : heap + nonHeap; |
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 assume the intent here to avoid producing any value if one don't have just one component (e.g. if we have heap init but do not have non-heap init)?
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.
|
👍 |
|
Released 0.44.0 |
Previously the default
-1values were used, resulting inconfusing dashboards that didn't make it obvious the data was
unavailable.
==COMMIT_MSG==
Memory gauges report null when data is unavailable
==COMMIT_MSG==