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 Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ExemplarFilter
alwaysOff()
A filter which makes no measurements eligible for being an exemplar.static ExemplarFilter
alwaysOn()
A filter which makes all measurements eligible for being an exemplar.boolean
shouldSampleMeasurement(double value, Attributes attributes, Context context)
Returns whether or not a reservoir should attempt to filter a measurement.boolean
shouldSampleMeasurement(long value, Attributes attributes, Context context)
Returns whether or not a reservoir should attempt to filter a measurement.static ExemplarFilter
traceBased()
A filter that only accepts measurements where there is aSpan
inContext
that 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 aSpan
inContext
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.
-
-