Interface Emitter
- All Known Implementing Classes:
AggregatingEmitter, TelemetryEmitter
public interface Emitter
-
Method Summary
Modifier and TypeMethodDescriptionbooleanemitMetric(SinglePointMetric metric) Emits a metric to all configuredExporterobjects.default booleanmaybeEmitMetric(SinglePointMetric metric) Emits a metric ifshouldEmitMetric(Keyed)returns true.booleanshouldEmitMetric(Keyed key) Tests whether this metric object could actually be emitted based on its key.
-
Method Details
-
shouldEmitMetric
Tests whether this metric object could actually be emitted based on its key. This is useful when materializing the metric object is an expensive operation.- Parameters:
key- metric key to test against- Returns:
- true if it is possible for this object to get emitted, false otherwise
-
emitMetric
Emits a metric to all configuredExporterobjects.- Parameters:
metric- to emit- Returns:
- true if exported by at least one exporter, false otherwise
-
maybeEmitMetric
Emits a metric ifshouldEmitMetric(Keyed)returns true.- Parameters:
metric- to emit- Returns:
- true if exported by at least one exporter, false otherwise
-