Interface ExemplarFilter


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

    Modifier and Type
    Method
    Description
    A filter that accepts any measurement.
    A filter that accepts no measurements.
    A filter that only accepts measurements where there is a Span in Context that is being sampled.
    boolean
    shouldSampleMeasurement(double value, io.opentelemetry.api.common.Attributes attributes, io.opentelemetry.context.Context context)
    Returns whether or not a reservoir should attempt to filter a measurement.
    boolean
    shouldSampleMeasurement(long value, io.opentelemetry.api.common.Attributes attributes, io.opentelemetry.context.Context context)
    Returns whether or not a reservoir should attempt to filter a measurement.
  • Method Details

    • shouldSampleMeasurement

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

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

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

      static ExemplarFilter alwaysSample()
      A filter that accepts any measurement.
    • neverSample

      static ExemplarFilter neverSample()
      A filter that accepts no measurements.