Skip to main content
Module

x/live/deps.ts>Sampler

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

This interface represent a sampler. Sampling is a mechanism to control the noise and overhead introduced by OpenTelemetry by reducing the number of samples of traces collected and sent to the backend.

Methods

shouldSample(
context: Context,
traceId: string,
spanName: string,
spanKind: SpanKind,
attributes: SpanAttributes,
links: Link[],
): SamplingResult

Checks whether span needs to be created and tracked.

toString(): string

Returns the sampler name or short description with the configuration.