Skip to content

Commit 757bb6b

Browse files
committed
profiling: add migration doc
1 parent da77c98 commit 757bb6b

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Continuous Profiling API Changes
2+
3+
The continuous profiling API has been redesigned to give developers more explicit control over profiling sessions while maintaining ease of use. This guide outlines the key changes.
4+
5+
## New Profiling Modes
6+
7+
### profileLifecycle Option
8+
9+
We've introduced a new `profileLifecycle` option that allows you to explicitly set how profiling sessions are managed:
10+
11+
- `manual` (default) - You control profiling sessions using the API methods
12+
- `trace` - Profiling sessions are automatically tied to traces
13+
14+
Previously, the profiling mode was implicitly determined by initialization options. Now you can clearly specify your intended behavior.
15+
16+
## Renamed API Methods
17+
18+
The main profiling control methods have been renamed to better reflect their purpose:
19+
20+
- `Sentry.profiler.start()``Sentry.profiler.startProfileSession()`
21+
- `Sentry.profiler.stop()``Sentry.profiler.stopProfileSession()`
22+
23+
The new names emphasize that these methods control profiling sessions and are subject to session sampling.
24+
25+
## New Sampling Controls
26+
27+
### profileSessionSampleRate
28+
29+
We've introduced `profileSessionSampleRate` to control what percentage of SDK instances will collect profiles. This is evaluated once during SDK initialization. This is particularly useful for:
30+
31+
- Controlling profiling costs across distributed services
32+
- Managing profiling in serverless environments where you may only want to profile a subset of instances
33+
34+
### Deprecations
35+
36+
The `profilesSampleRate` option has been deprecated in favor of the new sampling controls.
37+
The `profilesSampler` option hsa been deprecated in favor of manual profiler control.

0 commit comments

Comments
 (0)