Skip to main content
Module

x/live/deps.ts>TraceIdRatioBasedSampler

Open-Source web editor based on Preact, Tailwind and TypeScript. The other side of code.
Very Popular
Go to Latest
class TraceIdRatioBasedSampler
implements Sampler
import { TraceIdRatioBasedSampler } from "https://deno.land/x/live@1.48.5/deps.ts";

Sampler that samples a given fraction of traces based of trace id deterministically.

Constructors

new
TraceIdRatioBasedSampler(_ratio?: number)

Properties

private
_accumulate
private
_normalize
private
readonly
_ratio
private
_upperBound

Methods

shouldSample(context: unknown, traceId: string): SamplingResult
toString(): string