Class: LocalReservoir

LocalReservoir(fixedTarget, fallbackRate)

new LocalReservoir(fixedTarget, fallbackRate)

Represents a LocalReservoir object that keeps track of the number of traces per second sampled and the fixed rate for a given sampling rule defined locally. It also decides if a given trace should be sampled or not based on the state of current second.
Parameters:
Name Type Description
fixedTarget number An integer value to specify the maximum number of traces per second to sample.
fallbackRate number A value between 0 and 1 indicating the sampling rate after the maximum traces per second has been hit.
Source: