Interface ExemplarFilter

All Known Implementing Classes:
AlwaysOffFilter, AlwaysOnFilter, TraceBasedExemplarFilter

public interface ExemplarFilter
Exemplar filters are used to pre-filter measurements before attempting to store them in a reservoir.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Method Details

    • shouldSampleMeasurement

      boolean shouldSampleMeasurement(long value, Attributes attributes, Context context)
      Returns whether or not a reservoir should attempt to filter a measurement.
    • shouldSampleMeasurement

      boolean shouldSampleMeasurement(double value, Attributes attributes, Context context)
      Returns whether or not a reservoir should attempt to filter a measurement.
    • traceBased

      static ExemplarFilter traceBased()
      A filter that only accepts measurements where there is a Span in Context that is being sampled.
    • alwaysOn

      static ExemplarFilter alwaysOn()
      A filter which makes all measurements eligible for being an exemplar.
    • alwaysOff

      static ExemplarFilter alwaysOff()
      A filter which makes no measurements eligible for being an exemplar.