Interface ExemplarFilter
-
- All Known Implementing Classes:
AlwaysOffFilter,AlwaysOnFilter,TraceBasedExemplarFilter
public interface ExemplarFilterExemplar 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 Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ExemplarFilteralwaysOff()A filter which makes no measurements eligible for being an exemplar.static ExemplarFilteralwaysOn()A filter which makes all measurements eligible for being an exemplar.booleanshouldSampleMeasurement(double value, Attributes attributes, Context context)Returns whether or not a reservoir should attempt to filter a measurement.booleanshouldSampleMeasurement(long value, Attributes attributes, Context context)Returns whether or not a reservoir should attempt to filter a measurement.static ExemplarFiltertraceBased()A filter that only accepts measurements where there is aSpaninContextthat is being sampled.
-
-
-
Method Detail
-
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 aSpaninContextthat 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.
-
-