dd-trace
    Preparing search index...

    Interface SamplingRule

    Sampling rule to configure on the priority sampler.

    interface SamplingRule {
        maxPerSecond?: number;
        name?: string | RegExp;
        resource?: string | RegExp;
        sampleRate: number;
        service?: string | RegExp;
        tags?: { [key: string]: string | RegExp };
    }
    Index

    Properties

    maxPerSecond?: number

    Maximum number of traces matching this rule to sample per second.

    name?: string | RegExp

    Operation name on which to apply this rule. The rule will apply to all operation names if not provided.

    resource?: string | RegExp

    Resource name on which to apply this rule. The rule will apply to all resource names if not provided.

    sampleRate: number

    Sampling rate for this rule. A range between 0 and 1 representing the percent of traces sampled.

    service?: string | RegExp

    Service on which to apply this rule. The rule will apply to all services if not provided.

    tags?: { [key: string]: string | RegExp }

    Span tags on which to apply this rule, keyed by tag name. Each value is a glob pattern or regular expression, and the rule only applies when every entry matches the span's tags.