Interface MetricsSystem

All Known Implementing Classes:
NoopMetricsSystem

public interface MetricsSystem
General purpose factory for creating various metrics. Modeled off of the Dropwizard Metrics API.
  • Method Details

    • getTimer

      Timer getTimer(String name)
      Get or construct a Timer used to measure durations and report rates.
      Parameters:
      name - The name of the Timer.
      Returns:
      An instance of Timer.
    • getHistogram

      Histogram getHistogram(String name)
      Get or construct a Histogram used to measure a distribution of values.
      Parameters:
      name - The name of the Histogram.
      Returns:
      An instance of Histogram.
    • getMeter

      Meter getMeter(String name)
      Get or construct a Meter used to measure durations and report distributions (a combination of a Timer and a Histogram.
      Parameters:
      name - The name of the Meter.
      Returns:
      An instance of Meter.
    • getCounter

      Counter getCounter(String name)
      Get or construct a Counter used to track a mutable number.
      Parameters:
      name - The name of the Counter
      Returns:
      An instance of Counter.
    • register

      <T> void register(String name, Gauge<T> gauge)
      Register a Gauge. The Gauge will be invoked at a period defined by the implementation of MetricsSystem.
      Type Parameters:
      T - The type of the Gauge.
      Parameters:
      name - The name of the Gauge.
      gauge - A callback to compute the current value.