Skip to main content
Version: 4.16.5

Metric collection

BookKeeper enables metrics collection through a variety of stats providers.

Stats providers

BookKeeper has stats provider implementations for these sinks:

ProviderProvider class name
Codahale Metricsorg.apache.bookkeeper.stats.CodahaleMetricsProvider

The Codahale Metrics stats provider is the default provider.

Enabling stats providers in bookies

Two stats-related configuration parameters are available for bookies:

enableStatisticsWhether statistics are enabled for the bookiefalse
sanityCheckMetricsEnabledFlag to enable sanity check metrics in bookie statsfalse
statsProviderClassThe stats provider class used by the bookieorg.apache.bookkeeper.stats.CodahaleMetricsProvider

To enable stats:

  • set the enableStatistics parameter to true
  • set statsProviderClass to the desired provider (see the table above for a listing of classes)