File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
- import type { ClientOptions , Options , TracePropagationTargets } from '@sentry/types' ;
1
+ import type { ClientOptions , Options , SamplingContext , TracePropagationTargets } from '@sentry/types' ;
2
2
3
3
import type { NodeTransportOptions } from './transports' ;
4
4
@@ -8,6 +8,20 @@ export interface BaseNodeOptions {
8
8
*/
9
9
profilesSampleRate ?: number ;
10
10
11
+ /**
12
+ * Function to compute profiling sample rate dynamically and filter unwanted profiles.
13
+ *
14
+ * Profiling is enabled if either this or `profilesSampleRate` is defined. If both are defined, `profilesSampleRate` is
15
+ * ignored.
16
+ *
17
+ * Will automatically be passed a context object of default and optional custom data. See
18
+ * {@link Transaction.samplingContext} and {@link Hub.startTransaction}.
19
+ *
20
+ * @returns A sample rate between 0 and 1 (0 drops the profile, 1 guarantees it will be sent). Returning `true` is
21
+ * equivalent to returning 1 and returning `false` is equivalent to returning 0.
22
+ */
23
+ profilesSampler ?: ( samplingContext : SamplingContext ) => number | boolean ;
24
+
11
25
/** Sets an optional server name (device name) */
12
26
serverName ?: string ;
13
27
You can’t perform that action at this time.
0 commit comments