File tree Expand file tree Collapse file tree 2 files changed +30
-5
lines changed Expand file tree Collapse file tree 2 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,31 @@ export type BrowserClientReplayOptions = {
18
18
} ;
19
19
20
20
export type BrowserClientProfilingOptions = {
21
+ // todo: add deprecation warning for profilesSampleRate: @deprecated Use `profileSessionSampleRate` and `profileLifecycle` instead.
21
22
/**
22
23
* The sample rate for profiling
23
24
* 1.0 will profile all transactions and 0 will profile none.
24
25
*/
25
26
profilesSampleRate ?: number ;
27
+
28
+ /**
29
+ * Sets profiling session sample rate for the entire profiling session.
30
+ *
31
+ * A profiling session corresponds to a user session, so this rate determines what percentage of user sessions will have profiling enabled.
32
+ *
33
+ * @default 0
34
+ */
35
+ profileSessionSampleRate ?: number ;
36
+
37
+ /**
38
+ * Set the lifecycle mode of the profiler.
39
+ * - **manual**: The profiler will be manually started and stopped via `startProfiler`/`stopProfiler`.
40
+ * If a session is sampled, is dependent on the `profileSessionSampleRate`.
41
+ * - **trace**: The profiler will be automatically started when a root span exists and stopped when there are no
42
+ * more sampled root spans. Whether a session is sampled, is dependent on the `profileSessionSampleRate` and the
43
+ * existing sampling configuration for tracing (`tracesSampleRate`/`tracesSampler`).
44
+ *
45
+ * @default 'manual'
46
+ */
47
+ profileLifecycle ?: 'manual' | 'trace' ;
26
48
} ;
Original file line number Diff line number Diff line change @@ -46,16 +46,19 @@ export interface BaseNodeOptions {
46
46
profilesSampler ?: ( samplingContext : SamplingContext ) => number | boolean ;
47
47
48
48
/**
49
- * Sets profiling session sample rate - only evaluated once per SDK initialization.
49
+ * Sets profiling session sample rate for the entire profiling session (evaluated once per SDK initialization).
50
+ *
50
51
* @default 0
51
52
*/
52
53
profileSessionSampleRate ?: number ;
53
54
54
55
/**
55
- * Set the lifecycle of the profiler.
56
- *
57
- * - `manual`: The profiler will be manually started and stopped.
58
- * - `trace`: The profiler will be automatically started when when a span is sampled and stopped when there are no more sampled spans.
56
+ * Set the lifecycle mode of the profiler.
57
+ * - **manual**: The profiler will be manually started and stopped via `startProfiler`/`stopProfiler`.
58
+ * If a session is sampled, is dependent on the `profileSessionSampleRate`.
59
+ * - **trace**: The profiler will be automatically started when a root span exists and stopped when there are no
60
+ * more sampled root spans. Whether a session is sampled, is dependent on the `profileSessionSampleRate` and the
61
+ * existing sampling configuration for tracing (`tracesSampleRate`/`tracesSampler`).
59
62
*
60
63
* @default 'manual'
61
64
*/
You can’t perform that action at this time.
0 commit comments