Skip to content

Commit

Permalink
Update docs/product/explore/profiling/transaction-vs-continuous-profi…
Browse files Browse the repository at this point in the history
…ling.mdx

Co-authored-by: Liza Mock <[email protected]>
  • Loading branch information
JonasBa and lizokm committed Sep 19, 2024
1 parent 0a5194c commit 773ce17
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ We recommend that you call the `startProfiling` method right after the Sentry SD

## Enabling transaction or continuous profiling mode

Unfortunately, it is currently not possible to use both profiling modes at the same time, as they are mutually exlusive. Since the mode you intend on using depend on the SDK initialization arguments, it means that the profiling mode will have to be selected at the time the Sentry SDK is initialized.
Unfortunately, at this time it's not possible to use both profiling modes at the same time since they're mutually exclusive. Since the mode you intend to use is dependent on the SDK initialization arguments, profiling mode will have to be selected when the Sentry SDK is first initialized.

To enable continuous profiling mode, you should ensure that neither profileSampleRate or profilesSampler are set as the values to the Sentry.Init call. If either of those value are set, the SDK will default to transaction based profiling. When the SDK is configured for continuous profiling, the top level calls to start profiles will enable calls to the profiler. If the SDK is configured for transaction based profiling, then these calls will void and not trigger the profiler.
To enable continuous profiling, you have to make sure that neither `profileSampleRate` nor `profilesSampler` are set as the values of the `Sentry.Init` call. If either of those values are set, the SDK will default to transaction-based profiling. When the SDK is configured for continuous profiling, the top level calls to start profiles will enable calls to the profiler. If the SDK is configured for transaction-based profiling, these calls will void and not trigger the profiler.

Example of enabling continuous profiling in NodeJS
Here's an example of how to enable continuous profiling in NodeJS:

```javascript
Sentry.Init({
Expand Down

0 comments on commit 773ce17

Please sign in to comment.