Class TelemetryEmitter
java.lang.Object
io.confluent.telemetry.emitter.TelemetryEmitter
- All Implemented Interfaces:
Emitter
Must construct after
1.
TelemetryReporter.configure(java.util.Map<java.lang.String, ?>) [must be called first invalid input: '&' only once]
2. TelemetryReporter.contextChange(org.apache.kafka.common.metrics.MetricsContext) [must be called second]-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTelemetryEmitter(Context context, Supplier<Collection<Exporter>> exportersSupplier, org.apache.kafka.common.metrics.Metrics metrics) -
Method Summary
Modifier and TypeMethodDescriptionbooleanemitMetric(ContextExportableMetric exportableMetric) booleanemitMetric(SinglePointMetric metric) Emits a metric to all configuredExporterobjects.voidreconfigurePredicate(Predicate<? super Keyed> metricsPredicate) booleanshouldEmitMetric(Keyed key) Tests whether this metric object could actually be emitted based on its key.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.confluent.telemetry.emitter.Emitter
maybeEmitMetric
-
Field Details
-
log
public static final org.slf4j.Logger log
-
-
Constructor Details
-
TelemetryEmitter
public TelemetryEmitter(Context context, Supplier<Collection<Exporter>> exportersSupplier, org.apache.kafka.common.metrics.Metrics metrics)
-
-
Method Details
-
shouldEmitMetric
Description copied from interface:EmitterTests whether this metric object could actually be emitted based on its key. This is useful when materializing the metric object is an expensive operation.- Specified by:
shouldEmitMetricin interfaceEmitter- Parameters:
key- metric key to test against- Returns:
- true if it is possible for this object to get emitted, false otherwise
-
emitMetric
Description copied from interface:EmitterEmits a metric to all configuredExporterobjects.- Specified by:
emitMetricin interfaceEmitter- Parameters:
metric- to emit- Returns:
- true if exported by at least one exporter, false otherwise
-
emitMetric
-
reconfigurePredicate
-