Interface StatsProvider

All Known Implementing Classes:
CachingStatsProvider, CodahaleMetricsProvider, FastCodahaleMetricsProvider, NullStatsProvider, OtelMetricsProvider, PrometheusMetricsProvider

public interface StatsProvider
Provider to provide stats logger for different scopes.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return the stats logger to a given scope.
    default String
    getStatsName(String... statsComponents)
    Return the fully qualified stats name comprised of given statsComponents.
    void
    start(org.apache.commons.configuration2.Configuration conf)
    Initialize the stats provider by loading the given configuration conf.
    void
    Close the stats provider.
    default void
     
  • Method Details

    • start

      void start(org.apache.commons.configuration2.Configuration conf)
      Initialize the stats provider by loading the given configuration conf.
      Parameters:
      conf - Configuration to configure the stats provider.
    • stop

      void stop()
      Close the stats provider.
    • writeAllMetrics

      default void writeAllMetrics(Writer writer) throws IOException
      Parameters:
      writer -
      Throws:
      IOException
    • getStatsLogger

      StatsLogger getStatsLogger(String scope)
      Return the stats logger to a given scope.
      Parameters:
      scope - Scope for the given stats
      Returns:
      stats logger for the given scope
    • getStatsName

      default String getStatsName(String... statsComponents)
      Return the fully qualified stats name comprised of given statsComponents.
      Parameters:
      statsComponents - stats components to comprise the fully qualified stats name
      Returns:
      the fully qualified stats name