MetricRegistry

class MetricRegistry(config: Config, clock: Clock)

Handles creation and snapshotting of metrics. If a metric is created twice, the very same instance will be returned. If an attempt to create an existent metric with different settings is made, the new settings are ignored in favor of those of the already registered metric.

class Object
trait Matchable
class Any

Value members

Concrete methods

def bindScheduler(scheduler: ScheduledExecutorService): Unit
def clear(): Unit
def counter(name: String, description: Option[String], unit: Option[MeasurementUnit], autoUpdateInterval: Option[Duration]): Counter

Retrieves or registers a new counter-based metric.

Retrieves or registers a new counter-based metric.

def gauge(name: String, description: Option[String], unit: Option[MeasurementUnit], autoUpdateInterval: Option[Duration]): Gauge

Retrieves or registers a new gauge-based metric.

Retrieves or registers a new gauge-based metric.

def histogram(name: String, description: Option[String], unit: Option[MeasurementUnit], dynamicRange: Option[DynamicRange], autoUpdateInterval: Option[Duration]): Histogram

Retrieves or registers a new histogram-based metric.

Retrieves or registers a new histogram-based metric.

def rangeSampler(name: String, description: Option[String], unit: Option[MeasurementUnit], dynamicRange: Option[DynamicRange], autoUpdateInterval: Option[Duration]): RangeSampler

Retrieves or registers a new range sampler-based metric.

Retrieves or registers a new range sampler-based metric.

def reconfigure(newConfig: Config): Unit

Reconfigures the registry using the provided configuration.

Reconfigures the registry using the provided configuration.

def shutdown(): Unit
def snapshot(resetState: Boolean): PeriodSnapshot

Creates a period snapshot of all metrics contained in this registry. The period always starts at the instant of the last snapshot taken in which the state was reset and until the current instant. The special case of the first snapshot uses the registry creation instant as the starting point.

Creates a period snapshot of all metrics contained in this registry. The period always starts at the instant of the last snapshot taken in which the state was reset and until the current instant. The special case of the first snapshot uses the registry creation instant as the starting point.

Returns the current status of all metrics contained in the registry

Returns the current status of all metrics contained in the registry

def timer(name: String, description: Option[String], dynamicRange: Option[DynamicRange], autoUpdateInterval: Option[Duration]): Timer

Retrieves or registers a new timer-based metric.

Retrieves or registers a new timer-based metric.