Open anilgursel opened 6 years ago
I'm looking into this issue. We can implement it in the MaterializationMetricsCollector
. But IMO this should not be an issue for MaterializationMetricsCollector
but rather in the JmxReporter
.
The active
, created
and terminated
are three separate metrics and independent from JmxReporte
r's view. Not sure, how can that be achieved that way.
These three are totally independent counters. created
and terminated
only get incremented. Max is always the current value. active
gets incremented and decremented. This is where the max makes sense. But considering the concurrency on this metrics, what is even a reliable way to obtain a max short of putting another lock around both increment and max?
It is best effort. It can be another gauge or counter that shows the max of active
ever reached.
That's exactly what I mean, should derivation of the max be a separate counter, or should it be the monitoring infrastructure?
If Jmx Reporter already has the capability, I think we can utilize that, or potentially use a different metric that also keeps track of the max.
Currently, we see active, created, terminated rates. But, having a max would be useful as well, which we had in the past.