org.qi4j.api.metrics

## Interface MetricsProvider

- All Known Subinterfaces:
    YammerMetricsProvider
  All Known Implementing Classes:
    MetricsProviderAdapter, YammerMetricsMixin

      public interface MetricsProvider

  Metrics Provider SPI.

  The Zest Runtime will automatically ook for a service that implements the MetricsProvider interdace and use it for internal Runtime metrics, such as the UnitOfWork measuring the time from creation to close.

  The Metrics Library is available to add metric functionality to applications in the same way, and will use the same MetricsProvider.

  Note that the usual visibitlity rules applies, so you might have more than one MetricsProvider server, perhaps per layer.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T extends MetricsFactory> T` | `createFactory(Class<T> factoryType)` Creates a new factory instance.

- - ### Method Detail

    - #### createFactory

          <T extends MetricsFactory> T createFactory(Class<T> factoryType)
                                                 throws MetricsNotSupportedException

      Creates a new factory instance. The instanctiation is done by providing a Metric type, which is one of
      - `MetricsCounter`
      - `MetricsGauge`
      - `MetricsHealthCheck`
      - `MetricsHistogram`
      - `MetricsMeter`
      - `MetricsTimer`
      Type Parameters:
        `T` - The metric type requested.
      Parameters:
        `factoryType` - The class of the metric type needed.
      Returns:
        A factory instance
      Throws:
        `MetricsNotSupportedException` - when the MetricsProvider is not supporting the factory type requested.