Package org.apache.bookkeeper.stats.otel
Class OtelMetricsProvider
- java.lang.Object
-
- org.apache.bookkeeper.stats.otel.OtelMetricsProvider
-
- All Implemented Interfaces:
StatsProvider
public class OtelMetricsProvider extends java.lang.Object implements StatsProvider
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.concurrent.ConcurrentMap<ScopeContext,OtelCounter>
counters
(package private) io.opentelemetry.api.metrics.Meter
meter
(package private) java.util.concurrent.ConcurrentMap<ScopeContext,OtelOpStatsLogger>
opStats
-
Constructor Summary
Constructors Constructor Description OtelMetricsProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatsLogger
getStatsLogger(java.lang.String scope)
Return the stats logger to a given scope.void
start(org.apache.commons.configuration.Configuration conf)
Initialize the stats provider by loading the given configuration conf.void
stop()
Close the stats provider.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.bookkeeper.stats.StatsProvider
getStatsName, writeAllMetrics
-
-
-
-
Field Detail
-
counters
final java.util.concurrent.ConcurrentMap<ScopeContext,OtelCounter> counters
-
opStats
final java.util.concurrent.ConcurrentMap<ScopeContext,OtelOpStatsLogger> opStats
-
meter
final io.opentelemetry.api.metrics.Meter meter
-
-
Method Detail
-
start
public void start(org.apache.commons.configuration.Configuration conf)
Description copied from interface:StatsProvider
Initialize the stats provider by loading the given configuration conf.- Specified by:
start
in interfaceStatsProvider
- Parameters:
conf
- Configuration to configure the stats provider.
-
stop
public void stop()
Description copied from interface:StatsProvider
Close the stats provider.- Specified by:
stop
in interfaceStatsProvider
-
getStatsLogger
public StatsLogger getStatsLogger(java.lang.String scope)
Description copied from interface:StatsProvider
Return the stats logger to a given scope.- Specified by:
getStatsLogger
in interfaceStatsProvider
- Parameters:
scope
- Scope for the given stats- Returns:
- stats logger for the given scope
-
-