Class SLOMetricsCollector
java.lang.Object
io.confluent.telemetry.collector.SLOMetricsCollector
- All Implemented Interfaces:
MetricsCollector
A MetricsCollector that ensures exactly one metric will be exported per minute by oversampling the metric source
every 30 seconds. This sampling is done in a background thread so that it is decoupled from the call to
collect(Emitter).
When collect(Emitter) is called, the over-sampled metrics are aggregated to produce one metric per minute.
The behavior provided by this collector is needed for the calculation of Confluent's internal SLO. Our SLO is defined with a granularity of one minute, so we must capture the relevant metrics at precisely that granularity.
-
Field Summary
Fields inherited from interface MetricsCollector
LABEL_LIBRARY, LABEL_ORIGINAL, LIBRARY_NONE -
Constructor Summary
ConstructorsConstructorDescriptionSLOMetricsCollector(com.yammer.metrics.core.MetricsRegistry metricsRegistry, MetricNamingStrategy<com.yammer.metrics.core.MetricName> metricNamingStrategy) -
Method Summary
-
Constructor Details
-
SLOMetricsCollector
public SLOMetricsCollector(com.yammer.metrics.core.MetricsRegistry metricsRegistry, MetricNamingStrategy<com.yammer.metrics.core.MetricName> metricNamingStrategy)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceMetricsCollector
-
stop
public void stop()- Specified by:
stopin interfaceMetricsCollector
-
collect
- Specified by:
collectin interfaceMetricsCollector
-