Why Use CachedGauage in Dropwizard Metrics?
I can see that CachedGauge
in the DropWizard Metrics folder (formerly Coda Hale Metrics). I'm wondering why has anyone ever used this?!?
My understanding of the value of a metric is that it is real-time, accurate and relevant. If a metric reports a stale / cached value, what purpose could it work for?
source to share
By pointing the same link that you added:
Cached sensors
Coated sensor allows for more efficient reporting of values ββthat are expensive to calculate
What if your metric takes about two seconds to calculate, or even minutes? Will you count every time the user requests data? It makes sense to store it in the cache.
Such a metric is not what I would call real-time, because the update itself takes longer than providing information to the user. This metric was deprecated after the completion of the calculation.
source to share