UNPKG

988 BTypeScriptView Raw
1import type { Client, DynamicSamplingContext, Span } from '@sentry/types';
2/**
3 * Freeze the given DSC on the given span.
4 */
5export declare function freezeDscOnSpan(span: Span, dsc: Partial<DynamicSamplingContext>): void;
6/**
7 * Creates a dynamic sampling context from a client.
8 *
9 * Dispatches the `createDsc` lifecycle hook as a side effect.
10 */
11export declare function getDynamicSamplingContextFromClient(trace_id: string, client: Client): DynamicSamplingContext;
12/**
13 * Creates a dynamic sampling context from a span (and client and scope)
14 *
15 * @param span the span from which a few values like the root span name and sample rate are extracted.
16 *
17 * @returns a dynamic sampling context
18 */
19export declare function getDynamicSamplingContextFromSpan(span: Span): Readonly<Partial<DynamicSamplingContext>>;
20/**
21 * Convert a Span to a baggage header.
22 */
23export declare function spanToBaggageHeader(span: Span): string | undefined;
24//# sourceMappingURL=dynamicSamplingContext.d.ts.map
\No newline at end of file