Class LongToDoubleExemplarReservoir<T extends ExemplarData>
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.internal.exemplar.LongToDoubleExemplarReservoir<T>
-
- All Implemented Interfaces:
ExemplarReservoir<T>
class LongToDoubleExemplarReservoir<T extends ExemplarData> extends java.lang.Object implements ExemplarReservoir<T>
-
-
Field Summary
Fields Modifier and Type Field Description private ExemplarReservoir<T>
delegate
-
Constructor Summary
Constructors Constructor Description LongToDoubleExemplarReservoir(ExemplarReservoir<T> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<T>
collectAndReset(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 Detail
-
delegate
private final ExemplarReservoir<T extends ExemplarData> delegate
-
-
Constructor Detail
-
LongToDoubleExemplarReservoir
LongToDoubleExemplarReservoir(ExemplarReservoir<T> delegate)
-
-
Method Detail
-
offerDoubleMeasurement
public void offerDoubleMeasurement(double value, Attributes attributes, Context context)
Description copied from interface:ExemplarReservoir
Offers adouble
measurement to be sampled.- Specified by:
offerDoubleMeasurement
in interfaceExemplarReservoir<T extends ExemplarData>
-
offerLongMeasurement
public void offerLongMeasurement(long value, Attributes attributes, Context context)
Description copied from interface:ExemplarReservoir
Offers along
measurement to be sampled.- Specified by:
offerLongMeasurement
in interfaceExemplarReservoir<T extends ExemplarData>
-
collectAndReset
public java.util.List<T> collectAndReset(Attributes pointAttributes)
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.
-
-