public class Metrics extends Object implements EveryMinute
To provide custom metrics, implement MetricProvider and register it in the component model using the
Register annotation.
The collected metrics are updated once every minute.
| Constructor and Description |
|---|
Metrics() |
| Modifier and Type | Method and Description |
|---|---|
List<Metric> |
getMetrics()
Returns a list of all collected metrics so far.
|
void |
runTimer()
Called every time the timer interval is fired.
|
public void runTimer()
throws Exception
TimedTaskNote that only small computations can be done in this method. Computations which take longs must be executed in another executor as otherwise the timer will run out of schedule and start dropping tasks.
runTimer in interface TimedTaskException - in case anything goes wrong. Will be caught and handled using
ExceptionsTasks.executor(String)Copyright © 2018. All rights reserved.