metrics icon indicating copy to clipboard operation
metrics copied to clipboard

Add JVM shutdown hook to report the metrics from the current TimeWindow.

Open smrutilal2 opened this issue 5 years ago • 1 comments

Currently all the TimeWindow based reporter has to wait for the next time window to report the metrics. To make it work from a batch job or from a Lambda function, client will have to sleep for at least the reporting frequency (60 seconds by default) at the end of the job.

Instead we need to add a JVM shutdown hook that would flush and report the metrics from the current time window.

smrutilal2 avatar Sep 03 '19 21:09 smrutilal2

I would suggest - as a solution - that the existing "com.yahoo.yamas.YamasReporter#close()" would flush the report before returning...

gilad-bendor avatar Feb 06 '20 08:02 gilad-bendor