shouldSample
Make a deterministic sampling decision by hashing the anonymous ID against the rate. Rates at or below zero exclude all IDs; rates at or above one include all IDs.
import { shouldSample } from '@threadplane/telemetry';Declaration · overload 1
export declare function shouldSample(rate: number, anonId: string): boolean;Parameters
rate· requirednumberanonId· requiredstring
Returns
boolean