Class FilteredExemplarReservoir<T extends ExemplarData>
java.lang.Object
io.opentelemetry.sdk.metrics.internal.exemplar.FilteredExemplarReservoir<T>
- All Implemented Interfaces:
ExemplarReservoir<T>
class FilteredExemplarReservoir<T extends ExemplarData>
extends Object
implements ExemplarReservoir<T>
A reservoir that has a pre-filter on measurements.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFilteredExemplarReservoir
(ExemplarFilter filter, ExemplarReservoir<T> reservoir) -
Method Summary
Modifier and TypeMethodDescriptioncollectAndReset
(Attributes pointAttributes) Returns an immutable list of Exemplars for exporting from the current reservoir.void
offerDoubleMeasurement
(double value, Attributes attributes, Context context) Offers adouble
measurement to be sampled.void
offerLongMeasurement
(long value, Attributes attributes, Context context) Offers along
measurement to be sampled.
-
Field Details
-
filter
-
reservoir
-
-
Constructor Details
-
FilteredExemplarReservoir
FilteredExemplarReservoir(ExemplarFilter filter, ExemplarReservoir<T> reservoir)
-
-
Method Details
-
offerDoubleMeasurement
Description copied from interface:ExemplarReservoir
Offers adouble
measurement to be sampled.- Specified by:
offerDoubleMeasurement
in interfaceExemplarReservoir<T extends ExemplarData>
-
offerLongMeasurement
Description copied from interface:ExemplarReservoir
Offers along
measurement to be sampled.- Specified by:
offerLongMeasurement
in interfaceExemplarReservoir<T extends ExemplarData>
-
collectAndReset
Description copied from interface:ExemplarReservoir
Returns an immutable list of Exemplars for exporting from the current reservoir.Additionally, clears the reservoir for the next sampling period.
- Specified by:
collectAndReset
in interfaceExemplarReservoir<T extends ExemplarData>
- Parameters:
pointAttributes
- theAttributes
associated with the metric point.ExemplarData
s should filter these out of their final data state.- Returns:
- An (immutable) list of sampled exemplars for this point. Implementers are expected to
filter out
pointAttributes
from the original recorded attributes.
-