Skip to content

Commit 80e64f8

Browse files
committed
profiler: add profilelifecycle and profilesessionsamplerate
1 parent afc305f commit 80e64f8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/node/src/types.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,22 @@ export interface BaseNodeOptions {
4646
*/
4747
profilesSampler?: (samplingContext: SamplingContext) => number | boolean;
4848

49+
/**
50+
* Sets profiling session sample rate - only evaluated once per SDK initialization.
51+
* @default 0
52+
*/
53+
profileSessionSampleRate?: number;
54+
55+
/**
56+
* Set the lifecycle of the profiler.
57+
*
58+
* - `manual`: The profiler will be manually started and stopped.
59+
* - `trace`: The profiler will be automatically started when when a span is sampled and stopped when there are no more sampled spans.
60+
*
61+
* @default 'manual'
62+
*/
63+
profileLifecycle?: 'manual' | 'trace';
64+
4965
/** Sets an optional server name (device name) */
5066
serverName?: string;
5167

0 commit comments

Comments
 (0)