Interface Emitter

All Known Implementing Classes:
AggregatingEmitter, TelemetryEmitter

public interface Emitter
  • Method Details

    • shouldEmitMetric

      boolean shouldEmitMetric(Keyed key)
      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

      boolean emitMetric(SinglePointMetric metric)
      Emits a metric to all configured Exporter objects.
      Parameters:
      metric - to emit
      Returns:
      true if exported by at least one exporter, false otherwise
    • maybeEmitMetric

      default boolean maybeEmitMetric(SinglePointMetric metric)
      Emits a metric if shouldEmitMetric(Keyed) returns true.
      Parameters:
      metric - to emit
      Returns:
      true if exported by at least one exporter, false otherwise