1 | import type { DynamicSamplingContext } from '@sentry/types';
|
2 | export declare const BAGGAGE_HEADER_NAME = "baggage";
|
3 | export declare const SENTRY_BAGGAGE_KEY_PREFIX = "sentry-";
|
4 | export declare const SENTRY_BAGGAGE_KEY_PREFIX_REGEX: RegExp;
|
5 | /**
|
6 | * Max length of a serialized baggage string
|
7 | *
|
8 | * https://www.w3.org/TR/baggage/#limits
|
9 | */
|
10 | export declare const MAX_BAGGAGE_STRING_LENGTH = 8192;
|
11 | /**
|
12 | * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the "sentry-" prefixed values
|
13 | * from it.
|
14 | *
|
15 | * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.
|
16 | * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.
|
17 | */
|
18 | export declare function baggageHeaderToDynamicSamplingContext(baggageHeader: string | string[] | number | null | undefined | boolean): Partial<DynamicSamplingContext> | undefined;
|
19 | /**
|
20 | * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with "sentry-".
|
21 | *
|
22 | * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility
|
23 | * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is
|
24 | * `undefined` the function will return `undefined`.
|
25 | * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`
|
26 | * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.
|
27 | */
|
28 | export declare function dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext?: Partial<DynamicSamplingContext>): string | undefined;
|
29 | /**
|
30 | * Take a baggage header and parse it into an object.
|
31 | */
|
32 | export declare function parseBaggageHeader(baggageHeader: string | string[] | number | null | undefined | boolean): Record<string, string> | undefined;
|
33 | //# sourceMappingURL=baggage.d.ts.map |
\ | No newline at end of file |