A MetricKey
is a unique key associated with each metric.
A MetricListener
is capable of taking some action in response to a metric
being recorded, such as sending that metric to a third party service.
MetricState
represents a snapshot of the current state of a metric as of a
poiint in time.
MetricType
represents information about the state of a metric that is
particular to a certain type of metric, such as a histogram as opposed to a
counter.
A MetricClient
provides the functionality to consume metrics produced by
ZIO applications.
A MetricClient
provides the functionality to consume metrics produced by
ZIO applications. MetricClient
supports two ways of consuming metrics,
corresponding to the two ways that third party metrics services use metrics.
First, metrics services can poll for the current state of all recorded
metrics using the unsafeSnapshot
method, which provides a snapshot, as of a
point in time, of all metrics recorded by the ZIO application.
Second, metrics services can install a listener that will be notified every time a metric is updated.
MetricClient
is a lower level interface and is intended to be used by
implementers of integrations with third party metrics services but not by end
users.
A
MetricKey
is a unique key associated with each metric. The key is based on a combination of the metric type, the name and labels associated with the metric, and any other information to describe a a metric, such as the boundaries of a histogram. In this way, it is impossible to ever create metrics with conflicting keys.