Skip to main content
Module

x/live/deps.ts>ParentBasedSampler

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

A composite sampler that either respects the parent span's sampling decision or delegates to delegateSampler for root spans.

Constructors

new
ParentBasedSampler(config: ParentBasedSamplerConfig)

Properties

private
_localParentNotSampled
private
_localParentSampled
private
_remoteParentNotSampled
private
_remoteParentSampled
private
_root

Methods

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