diff --git a/docs/platforms/python/profiling/index.mdx b/docs/platforms/python/profiling/index.mdx index 85a02fe666989..aa36c1ad751e8 100644 --- a/docs/platforms/python/profiling/index.mdx +++ b/docs/platforms/python/profiling/index.mdx @@ -15,7 +15,6 @@ Python profiling is stable as of SDK version `1.18.0`. - ```python import sentry_sdk @@ -59,7 +58,7 @@ Profiling was experimental in SDK versions `1.17.0` and older. Learn how to upgr -_(New in version 2.21.0)_ +_(New in version 2.24.1)_ The current profiling implementation stops the profiler automatically after 30 seconds (unless you manually stop it earlier). Naturally, this limitation makes it difficult to get full coverage of your app's execution. We now offer an experimental continuous mode, where profiling data is periodically uploaded while running, with no limit on how long the profiler may run. @@ -96,7 +95,7 @@ sentry_sdk.profiler.start_profiler() sentry_sdk.profiler.stop_profiler() ``` -For some applications such as web servers, it may be difficult to call `sentry_sdk.profiler.start_profiler` in every process. Instead, you can use the `continuous_profiling_auto_start` option to automatically start the continuous profiler when a transaction is started. +For some applications such as web servers, it may be difficult to call `sentry_sdk.profiler.start_profiler` in every process. Instead, you can use the `profile_lifecycle` option to automatically profile anytime a transaction is active. ```python import sentry_sdk @@ -105,9 +104,9 @@ sentry_sdk.init( dsn="___PUBLIC_DSN___", send_default_pii=True, traces_sample_rate=1.0, - _experiments={ - "continuous_profiling_auto_start": True, - }, + # To collect profiles for all profile sessions, set `profile_session_sample_rate` to 1.0. + profile_session_sample_rate=1.0, + profile_lifecycle="trace", ) ```