DeterministicSampler class

Sampler that makes consistent sampling decisions for a seed, using Knuth hashing: the same seed always gets the same decision at a given rate.

Constructors

DeterministicSampler(double samplingRate)

Properties

hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
samplingRate → double
Value between 0 and 100, where 0 means nothing is sampled and 100 means everything is.
final

Methods

combined(double childRate) → DeterministicSampler
Returns a sampler that applies both this sampler's rate and childRate.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sample(BigInt seed) → bool
Whether seed, a 64-bit value, is sampled at samplingRate.
sampleTrace(TracingId traceId) → bool
Whether a trace should be sampled based on its Trace Id.
sampleUuid(String uuid) → bool
Whether the UUID uuid, such as a RUM session ID, is sampled at samplingRate. See seedFromUuid.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

seedFromUuid(String uuid) → BigInt
The seed for a UUID string: its last 48 bits (the last 12 hex digits), as the native SDKs use.