public class TelemetryEmitter extends Object implements Emitter
TelemetryReporter.configure(java.util.Map<java.lang.String, ?>)
[must be called first & only once]
2. TelemetryReporter.contextChange(org.apache.kafka.common.metrics.MetricsContext)
[must be called second]Constructor and Description |
---|
TelemetryEmitter(Context context,
Supplier<Collection<Exporter>> exportersSupplier,
org.apache.kafka.common.metrics.Metrics metrics) |
Modifier and Type | Method and Description |
---|---|
boolean |
emitMetric(SinglePointMetric metric)
Emits a metric to all configured
Exporter
objects. |
void |
reconfigurePredicate(Predicate<? super Keyed> metricsPredicate) |
boolean |
shouldEmitMetric(Keyed key)
Tests whether this metric object could actually be emitted based on its key.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
maybeEmitMetric
public TelemetryEmitter(Context context, Supplier<Collection<Exporter>> exportersSupplier, org.apache.kafka.common.metrics.Metrics metrics)
public boolean shouldEmitMetric(Keyed key)
Emitter
shouldEmitMetric
in interface Emitter
key
- metric key to test againstpublic boolean emitMetric(SinglePointMetric metric)
Emitter
Exporter
objects.emitMetric
in interface Emitter
metric
- to emit