Skip to content

Commit

Permalink
feat: add profiling compatibility include (#11190)
Browse files Browse the repository at this point in the history
* feat: add profiling compatibility include

* ref: reword compat

* Update includes/profiling-mode-explanation.mdx

Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com>

---------

Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com>
  • Loading branch information
2 people authored and Zylphrex committed Sep 4, 2024
1 parent 05bf151 commit a8d289b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions includes/profiling-mode-explanation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#### Continuous vs. Transaction-based Profiling

Sentry's profiler offers two profiling modes: continuous (new) and transaction-based (old).
In transaction-based profiling, the profiler integrates with the Sentry client to profile code executed during transaction start and stop calls. This approach has two main limitations:

- Limited visibility into program runtime (only profiling instrumented code)
- A maximum profile duration of 30 seconds (due to payload size constraints)

These limitations make transaction-based profiling unsuitable for long-running tasks or profiling long-lived processes.
Continuous profiling addresses these limitations by enabling profiling of long-running tasks. Since the profiler runs continuously and is not bound to the transaction model, it can provide visibility into non-instrumented code and surpass the 30-second profile duration limit.

#### Impact on Product Experience

We've worked to match the product experience between these two modes by inferring transaction events in continuous profiling mode. If you use both of our products, the experience remains largely the same. The main advantage of continuous profiling is the ability to escape the limitations of transaction-based profiling, and since profiles are no longer tied to transactions, it also means you can use profiling as a standalone product and are not forced to pay for transactions if you no longer wish to.

#### Compatibility Between Modes in the SDK

Continuous profiling mode is not compatible with transaction-based profiling, so you'll need to choose one or the other (you can switch between them at any time). To enable continuous profiling, ensure that the profiles sample rate and profiles sampler are not defined in the SDK. If they are defined, continuous profiling mode will be disabled.

0 comments on commit a8d289b

Please sign in to comment.