@PublicApi @ExportPackage

Package com.yahoo.metrics.simple

A metrics API with declarable metric, and also an implementation of the JDisc Metrics API where the newest state is made continously available.

Users should have an instance of MetricReceiver injected in the constructor where needed, then declare metrics as instances of Counter and Gauge using MetricReceiver.declareCounter(String), MetricReceiver.declareCounter(String, Point), MetricReceiver.declareGauge(String), MetricReceiver.declareGauge(String, Point), or MetricReceiver.declareGauge(String, java.util.Optional, MetricSettings).

Clients input data through the API in MetricReceiver, while the internal work is done by MetricAggregator. Initialization is done top-down from MetricManager. The link between calls to MetricReceiver and MetricAggregator is the role of MetricUpdater.

Author:
Steinar Knutsen