Class RandomFixedSizeExemplarReservoir<T extends ExemplarData>
java.lang.Object
io.opentelemetry.sdk.metrics.internal.exemplar.FixedSizeExemplarReservoir<T>
io.opentelemetry.sdk.metrics.internal.exemplar.RandomFixedSizeExemplarReservoir<T>
- All Implemented Interfaces:
ExemplarReservoir<T>
class RandomFixedSizeExemplarReservoir<T extends ExemplarData>
extends FixedSizeExemplarReservoir<T>
A
FixedSizeExemplarReservoir
which uses an un-unweighted/naive algorithm for sampler
where the probability of sampling decrease as the number of observations continue.
When measurements are collected via FixedSizeExemplarReservoir.collectAndReset(Attributes)
, the observation count is reset, making
the probability of samplings effectively 1.0.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
RandomFixedSizeExemplarReservoir
(Clock clock, int size, Supplier<Random> randomSupplier, BiFunction<ReservoirCell, Attributes, T> mapAndResetCell) -
Method Summary
Modifier and TypeMethodDescription(package private) static RandomFixedSizeExemplarReservoir
<DoubleExemplarData> createDouble
(Clock clock, int size, Supplier<Random> randomSupplier) (package private) static RandomFixedSizeExemplarReservoir
<LongExemplarData> createLong
(Clock clock, int size, Supplier<Random> randomSupplier) Methods inherited from class io.opentelemetry.sdk.metrics.internal.exemplar.FixedSizeExemplarReservoir
collectAndReset, offerDoubleMeasurement, offerLongMeasurement
-
Constructor Details
-
RandomFixedSizeExemplarReservoir
private RandomFixedSizeExemplarReservoir(Clock clock, int size, Supplier<Random> randomSupplier, BiFunction<ReservoirCell, Attributes, T> mapAndResetCell)
-
-
Method Details
-
createLong
static RandomFixedSizeExemplarReservoir<LongExemplarData> createLong(Clock clock, int size, Supplier<Random> randomSupplier) -
createDouble
static RandomFixedSizeExemplarReservoir<DoubleExemplarData> createDouble(Clock clock, int size, Supplier<Random> randomSupplier)
-