UNPKG

919 BTypeScriptView Raw
1import type { Options, SamplingContext } from '@sentry/types';
2import type { Transaction } from './transaction';
3/**
4 * Makes a sampling decision for the given transaction and stores it on the transaction.
5 *
6 * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be
7 * sent to Sentry.
8 *
9 * This method muttes the given `transaction` and will set the `sampled` value on it.
10 * It returns the same transaction, for convenience.
11 */
12export declare function sampleTransaction<T extends Transaction>(transaction: T, options: Pick<Options, 'tracesSampleRate' | 'tracesSampler' | 'enableTracing'>, samplingContext: SamplingContext): T;
13/**
14 * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).
15 */
16export declare function isValidSampleRate(rate: unknown): boolean;
17//# sourceMappingURL=sampling.d.ts.map
\No newline at end of file