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]| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
log |
| 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(ExportableMetric exportableMetric) |
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmaybeEmitMetricpublic TelemetryEmitter(Context context, Supplier<Collection<Exporter>> exportersSupplier, org.apache.kafka.common.metrics.Metrics metrics)
public boolean shouldEmitMetric(Keyed key)
EmittershouldEmitMetric in interface Emitterkey - metric key to test againstpublic boolean emitMetric(SinglePointMetric metric)
EmitterExporter
objects.emitMetric in interface Emittermetric - to emitpublic boolean emitMetric(ExportableMetric exportableMetric)