From 4b359c6e2cd18d225dff6a783ffa137af6850dd5 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Thu, 20 Feb 2025 13:37:16 -0500 Subject: [PATCH 1/6] chore(profiling): Update python profiling docs for new SDK This uses the updated python sdk where - `start_profiler` is replaced by `start_profile_session` - `stop_profiler` is replaced by `stop_profiler_session` - `_experiments["continuous_profiling_auto_start"]` is replaced by `profile_lifecycle` - this differs slightly to only profile traces instead of all the time --- .../gettingStartedDocs/python/aiohttp.spec.tsx | 6 ++---- static/app/gettingStartedDocs/python/aiohttp.tsx | 9 +++------ .../app/gettingStartedDocs/python/asgi.spec.tsx | 6 ++---- static/app/gettingStartedDocs/python/asgi.tsx | 9 +++------ .../gettingStartedDocs/python/awslambda.spec.tsx | 6 ++---- .../app/gettingStartedDocs/python/awslambda.tsx | 9 +++------ .../gettingStartedDocs/python/bottle.spec.tsx | 6 ++---- static/app/gettingStartedDocs/python/bottle.tsx | 9 +++------ .../gettingStartedDocs/python/celery.spec.tsx | 16 ++++++++++++---- static/app/gettingStartedDocs/python/celery.tsx | 10 +++++----- .../gettingStartedDocs/python/chalice.spec.tsx | 6 ++---- static/app/gettingStartedDocs/python/chalice.tsx | 9 +++------ .../gettingStartedDocs/python/django.spec.tsx | 6 ++---- static/app/gettingStartedDocs/python/django.tsx | 9 +++------ .../gettingStartedDocs/python/falcon.spec.tsx | 6 ++---- static/app/gettingStartedDocs/python/falcon.tsx | 9 +++------ .../gettingStartedDocs/python/fastapi.spec.tsx | 6 ++---- static/app/gettingStartedDocs/python/fastapi.tsx | 9 +++------ .../app/gettingStartedDocs/python/flask.spec.tsx | 6 ++---- static/app/gettingStartedDocs/python/flask.tsx | 9 +++------ .../python/gcpfunctions.spec.tsx | 6 ++---- .../gettingStartedDocs/python/gcpfunctions.tsx | 9 +++------ .../gettingStartedDocs/python/python.spec.tsx | 16 ++++++++++++---- static/app/gettingStartedDocs/python/python.tsx | 10 +++++----- .../app/gettingStartedDocs/python/quart.spec.tsx | 6 ++---- static/app/gettingStartedDocs/python/quart.tsx | 9 +++------ static/app/gettingStartedDocs/python/rq.spec.tsx | 12 ++++++++---- static/app/gettingStartedDocs/python/rq.tsx | 10 +++++----- .../python/serverless.spec.tsx | 6 ++---- .../app/gettingStartedDocs/python/serverless.tsx | 9 +++------ .../gettingStartedDocs/python/starlette.spec.tsx | 6 ++---- .../app/gettingStartedDocs/python/starlette.tsx | 9 +++------ .../gettingStartedDocs/python/tornado.spec.tsx | 6 ++---- static/app/gettingStartedDocs/python/tornado.tsx | 9 +++------ .../gettingStartedDocs/python/tryton.spec.tsx | 6 ++---- static/app/gettingStartedDocs/python/tryton.tsx | 9 +++------ .../app/gettingStartedDocs/python/wsgi.spec.tsx | 6 ++---- static/app/gettingStartedDocs/python/wsgi.tsx | 9 +++------ 38 files changed, 127 insertions(+), 187 deletions(-) diff --git a/static/app/gettingStartedDocs/python/aiohttp.spec.tsx b/static/app/gettingStartedDocs/python/aiohttp.spec.tsx index 9c4c7e096291fa..85751e67d57aa4 100644 --- a/static/app/gettingStartedDocs/python/aiohttp.spec.tsx +++ b/static/app/gettingStartedDocs/python/aiohttp.spec.tsx @@ -42,9 +42,7 @@ describe('aiohttp onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -75,7 +73,7 @@ describe('aiohttp onboarding docs', function () { // Does render continuous profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) + textWithMarkupMatcher(/profile_lifecycle: "trace"/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); diff --git a/static/app/gettingStartedDocs/python/aiohttp.tsx b/static/app/gettingStartedDocs/python/aiohttp.tsx index 79364d5a1c5d90..1ea1616974d3fb 100644 --- a/static/app/gettingStartedDocs/python/aiohttp.tsx +++ b/static/app/gettingStartedDocs/python/aiohttp.tsx @@ -48,12 +48,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/asgi.spec.tsx b/static/app/gettingStartedDocs/python/asgi.spec.tsx index a400cc54150f63..ce282128ee3b36 100644 --- a/static/app/gettingStartedDocs/python/asgi.spec.tsx +++ b/static/app/gettingStartedDocs/python/asgi.spec.tsx @@ -42,9 +42,7 @@ describe('asgi onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -73,7 +71,7 @@ describe('asgi onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/)) + screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/asgi.tsx b/static/app/gettingStartedDocs/python/asgi.tsx index d69a5903d9d656..a94aa3697ca889 100644 --- a/static/app/gettingStartedDocs/python/asgi.tsx +++ b/static/app/gettingStartedDocs/python/asgi.tsx @@ -46,12 +46,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/awslambda.spec.tsx b/static/app/gettingStartedDocs/python/awslambda.spec.tsx index f1469a835fe0fa..6055d560dbee96 100644 --- a/static/app/gettingStartedDocs/python/awslambda.spec.tsx +++ b/static/app/gettingStartedDocs/python/awslambda.spec.tsx @@ -42,9 +42,7 @@ describe('awslambda onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -73,7 +71,7 @@ describe('awslambda onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/)) + screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/awslambda.tsx b/static/app/gettingStartedDocs/python/awslambda.tsx index 73068600260818..a9e927720899ad 100644 --- a/static/app/gettingStartedDocs/python/awslambda.tsx +++ b/static/app/gettingStartedDocs/python/awslambda.tsx @@ -54,12 +54,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/bottle.spec.tsx b/static/app/gettingStartedDocs/python/bottle.spec.tsx index d26f5c9f331720..db3d20bee5ef8a 100644 --- a/static/app/gettingStartedDocs/python/bottle.spec.tsx +++ b/static/app/gettingStartedDocs/python/bottle.spec.tsx @@ -44,9 +44,7 @@ describe('bottle onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -77,7 +75,7 @@ describe('bottle onboarding docs', function () { // Does render continuous profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) + textWithMarkupMatcher(/profile_lifecycle: "trace",/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); diff --git a/static/app/gettingStartedDocs/python/bottle.tsx b/static/app/gettingStartedDocs/python/bottle.tsx index 1490fb4942d439..4819c85217a8eb 100644 --- a/static/app/gettingStartedDocs/python/bottle.tsx +++ b/static/app/gettingStartedDocs/python/bottle.tsx @@ -46,12 +46,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/celery.spec.tsx b/static/app/gettingStartedDocs/python/celery.spec.tsx index 5299482fc68893..e321bc131fc82a 100644 --- a/static/app/gettingStartedDocs/python/celery.spec.tsx +++ b/static/app/gettingStartedDocs/python/celery.spec.tsx @@ -46,10 +46,14 @@ describe('celery onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) + screen.queryByText( + textWithMarkupMatcher(/sentry_sdk.profiler.start_profile_session\(\)/) + ) ).not.toBeInTheDocument(); expect( - screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) + screen.queryByText( + textWithMarkupMatcher(/sentry_sdk.profiler.stop_profile_session\(\)/) + ) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -78,10 +82,14 @@ describe('celery onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) + screen.getByText( + textWithMarkupMatcher(/sentry_sdk.profiler.start_profile_session\(\)/) + ) ).toBeInTheDocument(); expect( - screen.getByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) + screen.getByText( + textWithMarkupMatcher(/sentry_sdk.profiler.stop_profile_session\(\)/) + ) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/celery.tsx b/static/app/gettingStartedDocs/python/celery.tsx index 9961a74fed7825..7ddfd278dce121 100644 --- a/static/app/gettingStartedDocs/python/celery.tsx +++ b/static/app/gettingStartedDocs/python/celery.tsx @@ -51,14 +51,14 @@ sentry_sdk.init( params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` -# Manually call start_profiler and stop_profiler +# Manually call start_profile_session and stop_profile_session # to profile the code in between -sentry_sdk.profiler.start_profiler() +sentry_sdk.profiler.start_profile_session() # this code will be profiled # -# Calls to stop_profiler are optional - if you don't stop the profiler, it will keep profiling -# your application until the process exits or stop_profiler is called. -sentry_sdk.profiler.stop_profiler()` +# Calls to stop_profile_session are optional - if you don't stop the profiler, it will keep profiling +# your application until the process exits or stop_profile_session is called. +sentry_sdk.profiler.stop_profile_session()` : '' }`; diff --git a/static/app/gettingStartedDocs/python/chalice.spec.tsx b/static/app/gettingStartedDocs/python/chalice.spec.tsx index 0d76a5b7eebf0f..a8a0f8376ef817 100644 --- a/static/app/gettingStartedDocs/python/chalice.spec.tsx +++ b/static/app/gettingStartedDocs/python/chalice.spec.tsx @@ -44,9 +44,7 @@ describe('chalice onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -75,7 +73,7 @@ describe('chalice onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/)) + screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/chalice.tsx b/static/app/gettingStartedDocs/python/chalice.tsx index fc0afa13d557c6..16a6de1933d200 100644 --- a/static/app/gettingStartedDocs/python/chalice.tsx +++ b/static/app/gettingStartedDocs/python/chalice.tsx @@ -44,12 +44,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/django.spec.tsx b/static/app/gettingStartedDocs/python/django.spec.tsx index f752e23a64bf8c..6e470ef6007dd6 100644 --- a/static/app/gettingStartedDocs/python/django.spec.tsx +++ b/static/app/gettingStartedDocs/python/django.spec.tsx @@ -44,9 +44,7 @@ describe('django onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -75,7 +73,7 @@ describe('django onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/)) + screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/django.tsx b/static/app/gettingStartedDocs/python/django.tsx index 1ac5501ebea481..79fe4506258516 100644 --- a/static/app/gettingStartedDocs/python/django.tsx +++ b/static/app/gettingStartedDocs/python/django.tsx @@ -46,12 +46,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/falcon.spec.tsx b/static/app/gettingStartedDocs/python/falcon.spec.tsx index 8ebe99546bde4d..ca0baa47f613b8 100644 --- a/static/app/gettingStartedDocs/python/falcon.spec.tsx +++ b/static/app/gettingStartedDocs/python/falcon.spec.tsx @@ -44,9 +44,7 @@ describe('falcon onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -77,7 +75,7 @@ describe('falcon onboarding docs', function () { // Does render continuous profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) + textWithMarkupMatcher(/profile_lifecycle: "trace",/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); diff --git a/static/app/gettingStartedDocs/python/falcon.tsx b/static/app/gettingStartedDocs/python/falcon.tsx index 3412ad637a557f..beddce952c5acd 100644 --- a/static/app/gettingStartedDocs/python/falcon.tsx +++ b/static/app/gettingStartedDocs/python/falcon.tsx @@ -47,12 +47,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/fastapi.spec.tsx b/static/app/gettingStartedDocs/python/fastapi.spec.tsx index fc31c125e87495..8379c1e84e7ef1 100644 --- a/static/app/gettingStartedDocs/python/fastapi.spec.tsx +++ b/static/app/gettingStartedDocs/python/fastapi.spec.tsx @@ -44,9 +44,7 @@ describe('flask onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -75,7 +73,7 @@ describe('flask onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/)) + screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/fastapi.tsx b/static/app/gettingStartedDocs/python/fastapi.tsx index daf2eec5637b3a..312b3e3e0b568e 100644 --- a/static/app/gettingStartedDocs/python/fastapi.tsx +++ b/static/app/gettingStartedDocs/python/fastapi.tsx @@ -49,12 +49,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/flask.spec.tsx b/static/app/gettingStartedDocs/python/flask.spec.tsx index a3dd1599174239..2825ce798e5d2e 100644 --- a/static/app/gettingStartedDocs/python/flask.spec.tsx +++ b/static/app/gettingStartedDocs/python/flask.spec.tsx @@ -44,9 +44,7 @@ describe('flask onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -77,7 +75,7 @@ describe('flask onboarding docs', function () { // Does render continuous profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) + textWithMarkupMatcher(/profile_lifecycle: "trace",/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); diff --git a/static/app/gettingStartedDocs/python/flask.tsx b/static/app/gettingStartedDocs/python/flask.tsx index 0f5904f3081397..f481812870267a 100644 --- a/static/app/gettingStartedDocs/python/flask.tsx +++ b/static/app/gettingStartedDocs/python/flask.tsx @@ -49,12 +49,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx b/static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx index 807da1c0146101..b61810e90c171f 100644 --- a/static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx +++ b/static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx @@ -42,9 +42,7 @@ describe('gcpfunctions onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -73,7 +71,7 @@ describe('gcpfunctions onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/)) + screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/gcpfunctions.tsx b/static/app/gettingStartedDocs/python/gcpfunctions.tsx index bb2baeee11a65e..a4887e3f31e1d1 100644 --- a/static/app/gettingStartedDocs/python/gcpfunctions.tsx +++ b/static/app/gettingStartedDocs/python/gcpfunctions.tsx @@ -48,12 +48,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/python.spec.tsx b/static/app/gettingStartedDocs/python/python.spec.tsx index 0306d5ae975343..f410877e530330 100644 --- a/static/app/gettingStartedDocs/python/python.spec.tsx +++ b/static/app/gettingStartedDocs/python/python.spec.tsx @@ -42,10 +42,14 @@ describe('python onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) + screen.queryByText( + textWithMarkupMatcher(/sentry_sdk.profiler.start_profile_session\(\)/) + ) ).not.toBeInTheDocument(); expect( - screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) + screen.queryByText( + textWithMarkupMatcher(/sentry_sdk.profiler.stop_profile_session\(\)/) + ) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -74,10 +78,14 @@ describe('python onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) + screen.getByText( + textWithMarkupMatcher(/sentry_sdk.profiler.start_profile_session\(\)/) + ) ).toBeInTheDocument(); expect( - screen.getByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) + screen.getByText( + textWithMarkupMatcher(/sentry_sdk.profiler.stop_profile_session\(\)/) + ) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/python.tsx b/static/app/gettingStartedDocs/python/python.tsx index fa3d7954bdb4de..b2d73f7377cff0 100644 --- a/static/app/gettingStartedDocs/python/python.tsx +++ b/static/app/gettingStartedDocs/python/python.tsx @@ -163,16 +163,16 @@ def fast_function(): time.sleep(0.05) return "done" -# Manually call start_profiler and stop_profiler +# Manually call start_profile_session and stop_profile_session # to profile the code in between -sentry_sdk.profiler.start_profiler() +sentry_sdk.profiler.start_profile_session() for i in range(0, 10): slow_function() fast_function() # -# Calls to stop_profiler are optional - if you don't stop the profiler, it will keep profiling -# your application until the process exits or stop_profiler is called. -sentry_sdk.profiler.stop_profiler()` +# Calls to stop_profile_session are optional - if you don't stop the profiler, it will keep profiling +# your application until the process exits or stop_profile_session is called. +sentry_sdk.profiler.stop_profile_session()` : '' }`; diff --git a/static/app/gettingStartedDocs/python/quart.spec.tsx b/static/app/gettingStartedDocs/python/quart.spec.tsx index 221b591fcf50ae..e133ac97a913d7 100644 --- a/static/app/gettingStartedDocs/python/quart.spec.tsx +++ b/static/app/gettingStartedDocs/python/quart.spec.tsx @@ -44,9 +44,7 @@ describe('quart onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -77,7 +75,7 @@ describe('quart onboarding docs', function () { // Does render continuous profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) + textWithMarkupMatcher(/profile_lifecycle: "trace",/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); diff --git a/static/app/gettingStartedDocs/python/quart.tsx b/static/app/gettingStartedDocs/python/quart.tsx index 18e5f6dcb54278..333bbf49f40b0a 100644 --- a/static/app/gettingStartedDocs/python/quart.tsx +++ b/static/app/gettingStartedDocs/python/quart.tsx @@ -49,12 +49,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/rq.spec.tsx b/static/app/gettingStartedDocs/python/rq.spec.tsx index 442fbf23894813..30f0dc51a17790 100644 --- a/static/app/gettingStartedDocs/python/rq.spec.tsx +++ b/static/app/gettingStartedDocs/python/rq.spec.tsx @@ -47,10 +47,14 @@ describe('rq onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) + screen.queryByText( + textWithMarkupMatcher(/sentry_sdk.profiler.start_profile_session\(\)/) + ) ).not.toBeInTheDocument(); expect( - screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) + screen.queryByText( + textWithMarkupMatcher(/sentry_sdk.profiler.stop_profile_session\(\)/) + ) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -81,13 +85,13 @@ describe('rq onboarding docs', function () { // Does render continuous profiling config const startMatches = screen.queryAllByText( - textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/) + textWithMarkupMatcher(/sentry_sdk.profiler.start_profile_session\(\)/) ); expect(startMatches.length).toBeGreaterThan(0); startMatches.forEach(match => expect(match).toBeInTheDocument()); const stopMatches = screen.queryAllByText( - textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/) + textWithMarkupMatcher(/sentry_sdk.profiler.stop_profile_session\(\)/) ); expect(stopMatches.length).toBeGreaterThan(0); stopMatches.forEach(match => expect(match).toBeInTheDocument()); diff --git a/static/app/gettingStartedDocs/python/rq.tsx b/static/app/gettingStartedDocs/python/rq.tsx index eff718180018ea..4731f2ce4f7157 100644 --- a/static/app/gettingStartedDocs/python/rq.tsx +++ b/static/app/gettingStartedDocs/python/rq.tsx @@ -44,14 +44,14 @@ sentry_sdk.init( params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` -# Manually call start_profiler and stop_profiler +# Manually call start_profile_session and stop_profile_session # to profile the code in between -sentry_sdk.profiler.start_profiler() +sentry_sdk.profiler.start_profile_session() # this code will be profiled # -# Calls to stop_profiler are optional - if you don't stop the profiler, it will keep profiling -# your application until the process exits or stop_profiler is called. -sentry_sdk.profiler.stop_profiler()` +# Calls to stop_profile_session are optional - if you don't stop the profiler, it will keep profiling +# your application until the process exits or stop_profile_session is called. +sentry_sdk.profiler.stop_profile_session()` : '' }`; diff --git a/static/app/gettingStartedDocs/python/serverless.spec.tsx b/static/app/gettingStartedDocs/python/serverless.spec.tsx index d7e2f417970f11..dfed373f619aba 100644 --- a/static/app/gettingStartedDocs/python/serverless.spec.tsx +++ b/static/app/gettingStartedDocs/python/serverless.spec.tsx @@ -42,9 +42,7 @@ describe('serverless onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -73,7 +71,7 @@ describe('serverless onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/)) + screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/serverless.tsx b/static/app/gettingStartedDocs/python/serverless.tsx index a5d772da3a0dee..864f57d6ce87de 100644 --- a/static/app/gettingStartedDocs/python/serverless.tsx +++ b/static/app/gettingStartedDocs/python/serverless.tsx @@ -44,12 +44,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/starlette.spec.tsx b/static/app/gettingStartedDocs/python/starlette.spec.tsx index bc794efeafd730..ab226e5d5ef846 100644 --- a/static/app/gettingStartedDocs/python/starlette.spec.tsx +++ b/static/app/gettingStartedDocs/python/starlette.spec.tsx @@ -44,9 +44,7 @@ describe('starlette onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -77,7 +75,7 @@ describe('starlette onboarding docs', function () { // Does render continuous profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) + textWithMarkupMatcher(/profile_lifecycle: "trace",/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); diff --git a/static/app/gettingStartedDocs/python/starlette.tsx b/static/app/gettingStartedDocs/python/starlette.tsx index c023a54bea12ee..59cf9dc5b1c1a5 100644 --- a/static/app/gettingStartedDocs/python/starlette.tsx +++ b/static/app/gettingStartedDocs/python/starlette.tsx @@ -47,12 +47,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/tornado.spec.tsx b/static/app/gettingStartedDocs/python/tornado.spec.tsx index 87485729e529b8..11f1386ee740c0 100644 --- a/static/app/gettingStartedDocs/python/tornado.spec.tsx +++ b/static/app/gettingStartedDocs/python/tornado.spec.tsx @@ -42,9 +42,7 @@ describe('tornado onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -75,7 +73,7 @@ describe('tornado onboarding docs', function () { // Does render continuous profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) + textWithMarkupMatcher(/profile_lifecycle: "trace",/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); diff --git a/static/app/gettingStartedDocs/python/tornado.tsx b/static/app/gettingStartedDocs/python/tornado.tsx index 7091228c31e724..bc14906b8374d5 100644 --- a/static/app/gettingStartedDocs/python/tornado.tsx +++ b/static/app/gettingStartedDocs/python/tornado.tsx @@ -46,12 +46,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/tryton.spec.tsx b/static/app/gettingStartedDocs/python/tryton.spec.tsx index 69f928b2d40604..d1d9a4cafb24ef 100644 --- a/static/app/gettingStartedDocs/python/tryton.spec.tsx +++ b/static/app/gettingStartedDocs/python/tryton.spec.tsx @@ -35,9 +35,7 @@ describe('tryton onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -66,7 +64,7 @@ describe('tryton onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/)) + screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/tryton.tsx b/static/app/gettingStartedDocs/python/tryton.tsx index 72f247d2402bfc..d92cd54579dd0c 100644 --- a/static/app/gettingStartedDocs/python/tryton.tsx +++ b/static/app/gettingStartedDocs/python/tryton.tsx @@ -40,12 +40,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/wsgi.spec.tsx b/static/app/gettingStartedDocs/python/wsgi.spec.tsx index b7aac850132c6c..7de64f834b160b 100644 --- a/static/app/gettingStartedDocs/python/wsgi.spec.tsx +++ b/static/app/gettingStartedDocs/python/wsgi.spec.tsx @@ -42,9 +42,7 @@ describe('wsgi onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/) - ) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -73,7 +71,7 @@ describe('wsgi onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/)) + screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/wsgi.tsx b/static/app/gettingStartedDocs/python/wsgi.tsx index 402f9ac2211d7a..3f6ec2b2208c8f 100644 --- a/static/app/gettingStartedDocs/python/wsgi.tsx +++ b/static/app/gettingStartedDocs/python/wsgi.tsx @@ -46,12 +46,9 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` - _experiments={ - # Set continuous_profiling_auto_start to True - # to automatically start the profiler on when - # possible. - "continuous_profiling_auto_start": True, - },` + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle: "trace",` : '' } ) From 19ef6d5b5c43e9293ffacb22adc47911b3993adf Mon Sep 17 00:00:00 2001 From: Jonas Date: Mon, 17 Mar 2025 10:02:25 -0400 Subject: [PATCH 2/6] chore(profiling): Update python profiling docs for new SDK (#87015) Rename to profile_session_sample_rate introduced in https://github.com/getsentry/sentry-python/pull/4002/files --- static/app/gettingStartedDocs/python/aiohttp.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/aiohttp.tsx | 4 ++-- static/app/gettingStartedDocs/python/asgi.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/asgi.tsx | 4 ++-- static/app/gettingStartedDocs/python/awslambda.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/awslambda.tsx | 4 ++-- static/app/gettingStartedDocs/python/bottle.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/bottle.tsx | 4 ++-- static/app/gettingStartedDocs/python/celery.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/celery.tsx | 4 ++-- static/app/gettingStartedDocs/python/chalice.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/chalice.tsx | 4 ++-- static/app/gettingStartedDocs/python/django.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/django.tsx | 4 ++-- static/app/gettingStartedDocs/python/falcon.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/falcon.tsx | 4 ++-- static/app/gettingStartedDocs/python/fastapi.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/fastapi.tsx | 4 ++-- static/app/gettingStartedDocs/python/flask.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/flask.tsx | 4 ++-- static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/gcpfunctions.tsx | 4 ++-- static/app/gettingStartedDocs/python/python.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/python.tsx | 4 ++-- static/app/gettingStartedDocs/python/quart.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/quart.tsx | 4 ++-- static/app/gettingStartedDocs/python/rq.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/rq.tsx | 4 ++-- static/app/gettingStartedDocs/python/serverless.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/serverless.tsx | 4 ++-- static/app/gettingStartedDocs/python/starlette.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/starlette.tsx | 4 ++-- static/app/gettingStartedDocs/python/tornado.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/tornado.tsx | 4 ++-- static/app/gettingStartedDocs/python/tryton.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/tryton.tsx | 4 ++-- static/app/gettingStartedDocs/python/wsgi.spec.tsx | 6 +++--- static/app/gettingStartedDocs/python/wsgi.tsx | 4 ++-- 38 files changed, 95 insertions(+), 95 deletions(-) diff --git a/static/app/gettingStartedDocs/python/aiohttp.spec.tsx b/static/app/gettingStartedDocs/python/aiohttp.spec.tsx index 85751e67d57aa4..820de70cd410a4 100644 --- a/static/app/gettingStartedDocs/python/aiohttp.spec.tsx +++ b/static/app/gettingStartedDocs/python/aiohttp.spec.tsx @@ -28,7 +28,7 @@ describe('aiohttp onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -47,7 +47,7 @@ describe('aiohttp onboarding docs', function () { // Does render transaction profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/profiles_sample_rate=1\.0,/) + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); @@ -68,7 +68,7 @@ describe('aiohttp onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate: 1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate: 1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/aiohttp.tsx b/static/app/gettingStartedDocs/python/aiohttp.tsx index 1ea1616974d3fb..2a6364f828595c 100644 --- a/static/app/gettingStartedDocs/python/aiohttp.tsx +++ b/static/app/gettingStartedDocs/python/aiohttp.tsx @@ -41,10 +41,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/asgi.spec.tsx b/static/app/gettingStartedDocs/python/asgi.spec.tsx index ce282128ee3b36..8440a4eb63acf1 100644 --- a/static/app/gettingStartedDocs/python/asgi.spec.tsx +++ b/static/app/gettingStartedDocs/python/asgi.spec.tsx @@ -28,7 +28,7 @@ describe('asgi onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -47,7 +47,7 @@ describe('asgi onboarding docs', function () { // Does render transaction profiling config expect( - screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).toBeInTheDocument(); }); @@ -66,7 +66,7 @@ describe('asgi onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/asgi.tsx b/static/app/gettingStartedDocs/python/asgi.tsx index a94aa3697ca889..824cfe3f02d3e1 100644 --- a/static/app/gettingStartedDocs/python/asgi.tsx +++ b/static/app/gettingStartedDocs/python/asgi.tsx @@ -39,10 +39,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/awslambda.spec.tsx b/static/app/gettingStartedDocs/python/awslambda.spec.tsx index 6055d560dbee96..ae9a40210a7363 100644 --- a/static/app/gettingStartedDocs/python/awslambda.spec.tsx +++ b/static/app/gettingStartedDocs/python/awslambda.spec.tsx @@ -28,7 +28,7 @@ describe('awslambda onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -47,7 +47,7 @@ describe('awslambda onboarding docs', function () { // Does render transaction profiling config expect( - screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).toBeInTheDocument(); }); @@ -66,7 +66,7 @@ describe('awslambda onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/awslambda.tsx b/static/app/gettingStartedDocs/python/awslambda.tsx index a9e927720899ad..f74d867e15f32a 100644 --- a/static/app/gettingStartedDocs/python/awslambda.tsx +++ b/static/app/gettingStartedDocs/python/awslambda.tsx @@ -47,10 +47,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/bottle.spec.tsx b/static/app/gettingStartedDocs/python/bottle.spec.tsx index db3d20bee5ef8a..65f35d479c2d91 100644 --- a/static/app/gettingStartedDocs/python/bottle.spec.tsx +++ b/static/app/gettingStartedDocs/python/bottle.spec.tsx @@ -30,7 +30,7 @@ describe('bottle onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -49,7 +49,7 @@ describe('bottle onboarding docs', function () { // Does render transaction profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/profiles_sample_rate=1\.0,/) + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); @@ -70,7 +70,7 @@ describe('bottle onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate: 1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate: 1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/bottle.tsx b/static/app/gettingStartedDocs/python/bottle.tsx index 4819c85217a8eb..f441dbd0279724 100644 --- a/static/app/gettingStartedDocs/python/bottle.tsx +++ b/static/app/gettingStartedDocs/python/bottle.tsx @@ -39,10 +39,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/celery.spec.tsx b/static/app/gettingStartedDocs/python/celery.spec.tsx index e321bc131fc82a..79e1e426c1d40f 100644 --- a/static/app/gettingStartedDocs/python/celery.spec.tsx +++ b/static/app/gettingStartedDocs/python/celery.spec.tsx @@ -32,7 +32,7 @@ describe('celery onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -58,7 +58,7 @@ describe('celery onboarding docs', function () { // Does render transaction profiling config expect( - screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).toBeInTheDocument(); }); @@ -77,7 +77,7 @@ describe('celery onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/celery.tsx b/static/app/gettingStartedDocs/python/celery.tsx index 7ddfd278dce121..09657c8223ece9 100644 --- a/static/app/gettingStartedDocs/python/celery.tsx +++ b/static/app/gettingStartedDocs/python/celery.tsx @@ -40,10 +40,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : '' } )${ diff --git a/static/app/gettingStartedDocs/python/chalice.spec.tsx b/static/app/gettingStartedDocs/python/chalice.spec.tsx index a8a0f8376ef817..14fb35f2f56891 100644 --- a/static/app/gettingStartedDocs/python/chalice.spec.tsx +++ b/static/app/gettingStartedDocs/python/chalice.spec.tsx @@ -30,7 +30,7 @@ describe('chalice onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -49,7 +49,7 @@ describe('chalice onboarding docs', function () { // Does render transaction profiling config expect( - screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).toBeInTheDocument(); }); @@ -68,7 +68,7 @@ describe('chalice onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/chalice.tsx b/static/app/gettingStartedDocs/python/chalice.tsx index 16a6de1933d200..ba5bdc22e24db4 100644 --- a/static/app/gettingStartedDocs/python/chalice.tsx +++ b/static/app/gettingStartedDocs/python/chalice.tsx @@ -37,10 +37,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/django.spec.tsx b/static/app/gettingStartedDocs/python/django.spec.tsx index 6e470ef6007dd6..9f8563a6d68dfd 100644 --- a/static/app/gettingStartedDocs/python/django.spec.tsx +++ b/static/app/gettingStartedDocs/python/django.spec.tsx @@ -30,7 +30,7 @@ describe('django onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -49,7 +49,7 @@ describe('django onboarding docs', function () { // Does render transaction profiling config expect( - screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).toBeInTheDocument(); }); @@ -68,7 +68,7 @@ describe('django onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/django.tsx b/static/app/gettingStartedDocs/python/django.tsx index 79fe4506258516..756f28de8bbd0a 100644 --- a/static/app/gettingStartedDocs/python/django.tsx +++ b/static/app/gettingStartedDocs/python/django.tsx @@ -39,10 +39,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/falcon.spec.tsx b/static/app/gettingStartedDocs/python/falcon.spec.tsx index ca0baa47f613b8..3e5cde86048cd3 100644 --- a/static/app/gettingStartedDocs/python/falcon.spec.tsx +++ b/static/app/gettingStartedDocs/python/falcon.spec.tsx @@ -30,7 +30,7 @@ describe('falcon onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -49,7 +49,7 @@ describe('falcon onboarding docs', function () { // Does render transaction profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/profiles_sample_rate=1\.0,/) + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); @@ -70,7 +70,7 @@ describe('falcon onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate: 1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate: 1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/falcon.tsx b/static/app/gettingStartedDocs/python/falcon.tsx index beddce952c5acd..ca8bcf9d95f5df 100644 --- a/static/app/gettingStartedDocs/python/falcon.tsx +++ b/static/app/gettingStartedDocs/python/falcon.tsx @@ -40,10 +40,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/fastapi.spec.tsx b/static/app/gettingStartedDocs/python/fastapi.spec.tsx index 8379c1e84e7ef1..f0b25b212f3cdd 100644 --- a/static/app/gettingStartedDocs/python/fastapi.spec.tsx +++ b/static/app/gettingStartedDocs/python/fastapi.spec.tsx @@ -30,7 +30,7 @@ describe('flask onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -49,7 +49,7 @@ describe('flask onboarding docs', function () { // Does render transaction profiling config expect( - screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).toBeInTheDocument(); }); @@ -68,7 +68,7 @@ describe('flask onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate: 1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate: 1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/fastapi.tsx b/static/app/gettingStartedDocs/python/fastapi.tsx index 312b3e3e0b568e..24285547831c83 100644 --- a/static/app/gettingStartedDocs/python/fastapi.tsx +++ b/static/app/gettingStartedDocs/python/fastapi.tsx @@ -42,10 +42,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/flask.spec.tsx b/static/app/gettingStartedDocs/python/flask.spec.tsx index 2825ce798e5d2e..8f061729d90dba 100644 --- a/static/app/gettingStartedDocs/python/flask.spec.tsx +++ b/static/app/gettingStartedDocs/python/flask.spec.tsx @@ -30,7 +30,7 @@ describe('flask onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -49,7 +49,7 @@ describe('flask onboarding docs', function () { // Does render transaction profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/profiles_sample_rate=1\.0,/) + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); @@ -70,7 +70,7 @@ describe('flask onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate: 1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate: 1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/flask.tsx b/static/app/gettingStartedDocs/python/flask.tsx index f481812870267a..4e5e84f4adadc9 100644 --- a/static/app/gettingStartedDocs/python/flask.tsx +++ b/static/app/gettingStartedDocs/python/flask.tsx @@ -42,10 +42,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx b/static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx index b61810e90c171f..a8b36b490879e0 100644 --- a/static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx +++ b/static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx @@ -28,7 +28,7 @@ describe('gcpfunctions onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -47,7 +47,7 @@ describe('gcpfunctions onboarding docs', function () { // Does render transaction profiling config expect( - screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).toBeInTheDocument(); }); @@ -66,7 +66,7 @@ describe('gcpfunctions onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/gcpfunctions.tsx b/static/app/gettingStartedDocs/python/gcpfunctions.tsx index a4887e3f31e1d1..8e362827e76fe3 100644 --- a/static/app/gettingStartedDocs/python/gcpfunctions.tsx +++ b/static/app/gettingStartedDocs/python/gcpfunctions.tsx @@ -41,10 +41,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/python.spec.tsx b/static/app/gettingStartedDocs/python/python.spec.tsx index f410877e530330..3e4d045d6ee898 100644 --- a/static/app/gettingStartedDocs/python/python.spec.tsx +++ b/static/app/gettingStartedDocs/python/python.spec.tsx @@ -28,7 +28,7 @@ describe('python onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -54,7 +54,7 @@ describe('python onboarding docs', function () { // Does render transaction profiling config expect( - screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).toBeInTheDocument(); }); @@ -73,7 +73,7 @@ describe('python onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/python.tsx b/static/app/gettingStartedDocs/python/python.tsx index b2d73f7377cff0..6cceecf37eb2f2 100644 --- a/static/app/gettingStartedDocs/python/python.tsx +++ b/static/app/gettingStartedDocs/python/python.tsx @@ -142,10 +142,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : '' } )${ diff --git a/static/app/gettingStartedDocs/python/quart.spec.tsx b/static/app/gettingStartedDocs/python/quart.spec.tsx index e133ac97a913d7..8110fe982399cf 100644 --- a/static/app/gettingStartedDocs/python/quart.spec.tsx +++ b/static/app/gettingStartedDocs/python/quart.spec.tsx @@ -30,7 +30,7 @@ describe('quart onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -49,7 +49,7 @@ describe('quart onboarding docs', function () { // Does render transaction profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/profiles_sample_rate=1\.0,/) + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); @@ -70,7 +70,7 @@ describe('quart onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate: 1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate: 1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/quart.tsx b/static/app/gettingStartedDocs/python/quart.tsx index 333bbf49f40b0a..846fba5a1dc939 100644 --- a/static/app/gettingStartedDocs/python/quart.tsx +++ b/static/app/gettingStartedDocs/python/quart.tsx @@ -42,10 +42,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/rq.spec.tsx b/static/app/gettingStartedDocs/python/rq.spec.tsx index 30f0dc51a17790..9ffaab8430a819 100644 --- a/static/app/gettingStartedDocs/python/rq.spec.tsx +++ b/static/app/gettingStartedDocs/python/rq.spec.tsx @@ -33,7 +33,7 @@ describe('rq onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -59,7 +59,7 @@ describe('rq onboarding docs', function () { // Does render transaction profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/profiles_sample_rate=1\.0,/) + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); @@ -80,7 +80,7 @@ describe('rq onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/rq.tsx b/static/app/gettingStartedDocs/python/rq.tsx index 4731f2ce4f7157..70366bf7f124d6 100644 --- a/static/app/gettingStartedDocs/python/rq.tsx +++ b/static/app/gettingStartedDocs/python/rq.tsx @@ -33,10 +33,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : '' } )${ diff --git a/static/app/gettingStartedDocs/python/serverless.spec.tsx b/static/app/gettingStartedDocs/python/serverless.spec.tsx index dfed373f619aba..555109c4b439f9 100644 --- a/static/app/gettingStartedDocs/python/serverless.spec.tsx +++ b/static/app/gettingStartedDocs/python/serverless.spec.tsx @@ -28,7 +28,7 @@ describe('serverless onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -47,7 +47,7 @@ describe('serverless onboarding docs', function () { // Does render transaction profiling config expect( - screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).toBeInTheDocument(); }); @@ -66,7 +66,7 @@ describe('serverless onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/serverless.tsx b/static/app/gettingStartedDocs/python/serverless.tsx index 864f57d6ce87de..92b2c05b70febb 100644 --- a/static/app/gettingStartedDocs/python/serverless.tsx +++ b/static/app/gettingStartedDocs/python/serverless.tsx @@ -37,10 +37,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/starlette.spec.tsx b/static/app/gettingStartedDocs/python/starlette.spec.tsx index ab226e5d5ef846..c0e5d6fa317d52 100644 --- a/static/app/gettingStartedDocs/python/starlette.spec.tsx +++ b/static/app/gettingStartedDocs/python/starlette.spec.tsx @@ -30,7 +30,7 @@ describe('starlette onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -49,7 +49,7 @@ describe('starlette onboarding docs', function () { // Does render transaction profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/profiles_sample_rate=1\.0,/) + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); @@ -70,7 +70,7 @@ describe('starlette onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate: 1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate: 1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/starlette.tsx b/static/app/gettingStartedDocs/python/starlette.tsx index 59cf9dc5b1c1a5..7b830e2ddfeb19 100644 --- a/static/app/gettingStartedDocs/python/starlette.tsx +++ b/static/app/gettingStartedDocs/python/starlette.tsx @@ -40,10 +40,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/tornado.spec.tsx b/static/app/gettingStartedDocs/python/tornado.spec.tsx index 11f1386ee740c0..98434383ab8c81 100644 --- a/static/app/gettingStartedDocs/python/tornado.spec.tsx +++ b/static/app/gettingStartedDocs/python/tornado.spec.tsx @@ -28,7 +28,7 @@ describe('tornado onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -47,7 +47,7 @@ describe('tornado onboarding docs', function () { // Does render transaction profiling config const matches = screen.getAllByText( - textWithMarkupMatcher(/profiles_sample_rate=1\.0,/) + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); expect(matches.length).toBeGreaterThan(0); matches.forEach(match => expect(match).toBeInTheDocument()); @@ -68,7 +68,7 @@ describe('tornado onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate: 1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate: 1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/tornado.tsx b/static/app/gettingStartedDocs/python/tornado.tsx index bc14906b8374d5..12201442eaed39 100644 --- a/static/app/gettingStartedDocs/python/tornado.tsx +++ b/static/app/gettingStartedDocs/python/tornado.tsx @@ -39,10 +39,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/tryton.spec.tsx b/static/app/gettingStartedDocs/python/tryton.spec.tsx index d1d9a4cafb24ef..9bdbb4e4af4697 100644 --- a/static/app/gettingStartedDocs/python/tryton.spec.tsx +++ b/static/app/gettingStartedDocs/python/tryton.spec.tsx @@ -21,7 +21,7 @@ describe('tryton onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -40,7 +40,7 @@ describe('tryton onboarding docs', function () { // Does render transaction profiling config expect( - screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).toBeInTheDocument(); }); @@ -59,7 +59,7 @@ describe('tryton onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/tryton.tsx b/static/app/gettingStartedDocs/python/tryton.tsx index d92cd54579dd0c..9747e974e0f0c0 100644 --- a/static/app/gettingStartedDocs/python/tryton.tsx +++ b/static/app/gettingStartedDocs/python/tryton.tsx @@ -33,10 +33,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` diff --git a/static/app/gettingStartedDocs/python/wsgi.spec.tsx b/static/app/gettingStartedDocs/python/wsgi.spec.tsx index 7de64f834b160b..52b9162d75ae8e 100644 --- a/static/app/gettingStartedDocs/python/wsgi.spec.tsx +++ b/static/app/gettingStartedDocs/python/wsgi.spec.tsx @@ -28,7 +28,7 @@ describe('wsgi onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option @@ -47,7 +47,7 @@ describe('wsgi onboarding docs', function () { // Does render transaction profiling config expect( - screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).toBeInTheDocument(); }); @@ -66,7 +66,7 @@ describe('wsgi onboarding docs', function () { // Does not render transaction profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does render continuous profiling config diff --git a/static/app/gettingStartedDocs/python/wsgi.tsx b/static/app/gettingStartedDocs/python/wsgi.tsx index 3f6ec2b2208c8f..3816305d341515 100644 --- a/static/app/gettingStartedDocs/python/wsgi.tsx +++ b/static/app/gettingStartedDocs/python/wsgi.tsx @@ -39,10 +39,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profiles_sample_rate to 1.0 to profile 100% + # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profiles_sample_rate=1.0,` + profile_session_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` From 7321c943cf12e5480bc04f425b3129886bed4f36 Mon Sep 17 00:00:00 2001 From: Francesco Vigliaturo Date: Wed, 19 Mar 2025 14:32:54 +0100 Subject: [PATCH 3/6] update getting started doc to use start_profiler and stop_profiler instead of start_profile_session and stop_profile_session --- .../gettingStartedDocs/python/celery.spec.tsx | 16 ++++------------ static/app/gettingStartedDocs/python/celery.tsx | 10 +++++----- .../gettingStartedDocs/python/python.spec.tsx | 16 ++++------------ static/app/gettingStartedDocs/python/python.tsx | 10 +++++----- static/app/gettingStartedDocs/python/rq.spec.tsx | 12 ++++-------- static/app/gettingStartedDocs/python/rq.tsx | 10 +++++----- 6 files changed, 27 insertions(+), 47 deletions(-) diff --git a/static/app/gettingStartedDocs/python/celery.spec.tsx b/static/app/gettingStartedDocs/python/celery.spec.tsx index 79e1e426c1d40f..d1674989dbb206 100644 --- a/static/app/gettingStartedDocs/python/celery.spec.tsx +++ b/static/app/gettingStartedDocs/python/celery.spec.tsx @@ -46,14 +46,10 @@ describe('celery onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/sentry_sdk.profiler.start_profile_session\(\)/) - ) + screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) ).not.toBeInTheDocument(); expect( - screen.queryByText( - textWithMarkupMatcher(/sentry_sdk.profiler.stop_profile_session\(\)/) - ) + screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -82,14 +78,10 @@ describe('celery onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText( - textWithMarkupMatcher(/sentry_sdk.profiler.start_profile_session\(\)/) - ) + screen.getByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) ).toBeInTheDocument(); expect( - screen.getByText( - textWithMarkupMatcher(/sentry_sdk.profiler.stop_profile_session\(\)/) - ) + screen.getByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/celery.tsx b/static/app/gettingStartedDocs/python/celery.tsx index 09657c8223ece9..a6ddc8bf38b836 100644 --- a/static/app/gettingStartedDocs/python/celery.tsx +++ b/static/app/gettingStartedDocs/python/celery.tsx @@ -51,14 +51,14 @@ sentry_sdk.init( params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` -# Manually call start_profile_session and stop_profile_session +# Manually call start_profiler and stop_profiler # to profile the code in between -sentry_sdk.profiler.start_profile_session() +sentry_sdk.profiler.start_profiler() # this code will be profiled # -# Calls to stop_profile_session are optional - if you don't stop the profiler, it will keep profiling -# your application until the process exits or stop_profile_session is called. -sentry_sdk.profiler.stop_profile_session()` +# Calls to stop_profiler are optional - if you don't stop the profiler, it will keep profiling +# your application until the process exits or stop_profiler is called. +sentry_sdk.profiler.stop_profiler()` : '' }`; diff --git a/static/app/gettingStartedDocs/python/python.spec.tsx b/static/app/gettingStartedDocs/python/python.spec.tsx index 3e4d045d6ee898..60ee471b9add3c 100644 --- a/static/app/gettingStartedDocs/python/python.spec.tsx +++ b/static/app/gettingStartedDocs/python/python.spec.tsx @@ -42,14 +42,10 @@ describe('python onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/sentry_sdk.profiler.start_profile_session\(\)/) - ) + screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) ).not.toBeInTheDocument(); expect( - screen.queryByText( - textWithMarkupMatcher(/sentry_sdk.profiler.stop_profile_session\(\)/) - ) + screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -78,14 +74,10 @@ describe('python onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText( - textWithMarkupMatcher(/sentry_sdk.profiler.start_profile_session\(\)/) - ) + screen.getByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) ).toBeInTheDocument(); expect( - screen.getByText( - textWithMarkupMatcher(/sentry_sdk.profiler.stop_profile_session\(\)/) - ) + screen.getByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/python.tsx b/static/app/gettingStartedDocs/python/python.tsx index 6668facaec2b2e..ff233787ba4d21 100644 --- a/static/app/gettingStartedDocs/python/python.tsx +++ b/static/app/gettingStartedDocs/python/python.tsx @@ -176,16 +176,16 @@ def fast_function(): time.sleep(0.05) return "done" -# Manually call start_profile_session and stop_profile_session +# Manually call start_profiler and stop_profiler # to profile the code in between -sentry_sdk.profiler.start_profile_session() +sentry_sdk.profiler.start_profiler() for i in range(0, 10): slow_function() fast_function() # -# Calls to stop_profile_session are optional - if you don't stop the profiler, it will keep profiling -# your application until the process exits or stop_profile_session is called. -sentry_sdk.profiler.stop_profile_session()` +# Calls to stop_profiler are optional - if you don't stop the profiler, it will keep profiling +# your application until the process exits or stop_profiler is called. +sentry_sdk.profiler.stop_profiler()` : '' }`; diff --git a/static/app/gettingStartedDocs/python/rq.spec.tsx b/static/app/gettingStartedDocs/python/rq.spec.tsx index 9ffaab8430a819..6fc06c6a3110d8 100644 --- a/static/app/gettingStartedDocs/python/rq.spec.tsx +++ b/static/app/gettingStartedDocs/python/rq.spec.tsx @@ -47,14 +47,10 @@ describe('rq onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText( - textWithMarkupMatcher(/sentry_sdk.profiler.start_profile_session\(\)/) - ) + screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) ).not.toBeInTheDocument(); expect( - screen.queryByText( - textWithMarkupMatcher(/sentry_sdk.profiler.stop_profile_session\(\)/) - ) + screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -85,13 +81,13 @@ describe('rq onboarding docs', function () { // Does render continuous profiling config const startMatches = screen.queryAllByText( - textWithMarkupMatcher(/sentry_sdk.profiler.start_profile_session\(\)/) + textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/) ); expect(startMatches.length).toBeGreaterThan(0); startMatches.forEach(match => expect(match).toBeInTheDocument()); const stopMatches = screen.queryAllByText( - textWithMarkupMatcher(/sentry_sdk.profiler.stop_profile_session\(\)/) + textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/) ); expect(stopMatches.length).toBeGreaterThan(0); stopMatches.forEach(match => expect(match).toBeInTheDocument()); diff --git a/static/app/gettingStartedDocs/python/rq.tsx b/static/app/gettingStartedDocs/python/rq.tsx index 70366bf7f124d6..8fee095afd1812 100644 --- a/static/app/gettingStartedDocs/python/rq.tsx +++ b/static/app/gettingStartedDocs/python/rq.tsx @@ -44,14 +44,14 @@ sentry_sdk.init( params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` -# Manually call start_profile_session and stop_profile_session +# Manually call start_profiler and stop_profiler # to profile the code in between -sentry_sdk.profiler.start_profile_session() +sentry_sdk.profiler.start_profiler() # this code will be profiled # -# Calls to stop_profile_session are optional - if you don't stop the profiler, it will keep profiling -# your application until the process exits or stop_profile_session is called. -sentry_sdk.profiler.stop_profile_session()` +# Calls to stop_profiler are optional - if you don't stop the profiler, it will keep profiling +# your application until the process exits or stop_profiler is called. +sentry_sdk.profiler.stop_profiler()` : '' }`; From b82fcfb9e4136d9c5e1a800d4b079be65dd3e1b3 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Fri, 28 Mar 2025 17:27:09 -0400 Subject: [PATCH 4/6] fix docs for continuous profiler --- .../python/aiohttp.spec.tsx | 24 ++++++++------- .../app/gettingStartedDocs/python/aiohttp.tsx | 5 +++- .../gettingStartedDocs/python/asgi.spec.tsx | 10 +++++-- static/app/gettingStartedDocs/python/asgi.tsx | 5 +++- .../python/awslambda.spec.tsx | 10 +++++-- .../gettingStartedDocs/python/awslambda.tsx | 5 +++- .../gettingStartedDocs/python/bottle.spec.tsx | 18 +++++++---- .../app/gettingStartedDocs/python/bottle.tsx | 5 +++- .../gettingStartedDocs/python/celery.spec.tsx | 8 ++--- .../app/gettingStartedDocs/python/celery.tsx | 30 ++++++++----------- .../python/chalice.spec.tsx | 10 +++++-- .../app/gettingStartedDocs/python/chalice.tsx | 5 +++- .../gettingStartedDocs/python/django.spec.tsx | 10 +++++-- .../app/gettingStartedDocs/python/django.tsx | 5 +++- .../gettingStartedDocs/python/falcon.spec.tsx | 18 +++++++---- .../app/gettingStartedDocs/python/falcon.tsx | 5 +++- .../python/fastapi.spec.tsx | 10 +++++-- .../app/gettingStartedDocs/python/fastapi.tsx | 5 +++- .../gettingStartedDocs/python/flask.spec.tsx | 18 +++++++---- .../app/gettingStartedDocs/python/flask.tsx | 5 +++- .../python/gcpfunctions.spec.tsx | 10 +++++-- .../python/gcpfunctions.tsx | 5 +++- .../app/gettingStartedDocs/python/python.tsx | 11 +++++-- .../gettingStartedDocs/python/quart.spec.tsx | 18 +++++++---- .../app/gettingStartedDocs/python/quart.tsx | 5 +++- .../app/gettingStartedDocs/python/rq.spec.tsx | 21 +++++++------ static/app/gettingStartedDocs/python/rq.tsx | 30 ++++++++----------- .../python/serverless.spec.tsx | 10 +++++-- .../gettingStartedDocs/python/serverless.tsx | 5 +++- .../python/starlette.spec.tsx | 18 +++++++---- .../gettingStartedDocs/python/starlette.tsx | 5 +++- .../python/tornado.spec.tsx | 18 +++++++---- .../app/gettingStartedDocs/python/tornado.tsx | 5 +++- .../gettingStartedDocs/python/tryton.spec.tsx | 10 +++++-- .../app/gettingStartedDocs/python/tryton.tsx | 5 +++- .../gettingStartedDocs/python/wsgi.spec.tsx | 10 +++++-- static/app/gettingStartedDocs/python/wsgi.tsx | 5 +++- 37 files changed, 276 insertions(+), 126 deletions(-) diff --git a/static/app/gettingStartedDocs/python/aiohttp.spec.tsx b/static/app/gettingStartedDocs/python/aiohttp.spec.tsx index 820de70cd410a4..87233673016fff 100644 --- a/static/app/gettingStartedDocs/python/aiohttp.spec.tsx +++ b/static/app/gettingStartedDocs/python/aiohttp.spec.tsx @@ -42,15 +42,16 @@ describe('aiohttp onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config - const matches = screen.getAllByText( - textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) - ); - expect(matches.length).toBeGreaterThan(0); - matches.forEach(match => expect(match).toBeInTheDocument()); + expect( + screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) + ).toBeInTheDocument(); }); it('renders continuous profiling', function () { @@ -72,10 +73,11 @@ describe('aiohttp onboarding docs', function () { ).not.toBeInTheDocument(); // Does render continuous profiling config - const matches = screen.getAllByText( - textWithMarkupMatcher(/profile_lifecycle: "trace"/) - ); - expect(matches.length).toBeGreaterThan(0); - matches.forEach(match => expect(match).toBeInTheDocument()); + expect( + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).toBeInTheDocument(); + expect( + screen.getByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) + ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/aiohttp.tsx b/static/app/gettingStartedDocs/python/aiohttp.tsx index 2a6364f828595c..dab1d698cffea5 100644 --- a/static/app/gettingStartedDocs/python/aiohttp.tsx +++ b/static/app/gettingStartedDocs/python/aiohttp.tsx @@ -48,9 +48,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/asgi.spec.tsx b/static/app/gettingStartedDocs/python/asgi.spec.tsx index 8440a4eb63acf1..d152fc46d460c3 100644 --- a/static/app/gettingStartedDocs/python/asgi.spec.tsx +++ b/static/app/gettingStartedDocs/python/asgi.spec.tsx @@ -42,7 +42,10 @@ describe('asgi onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -71,7 +74,10 @@ describe('asgi onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).toBeInTheDocument(); + expect( + screen.getByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/asgi.tsx b/static/app/gettingStartedDocs/python/asgi.tsx index 824cfe3f02d3e1..e44b00d874c978 100644 --- a/static/app/gettingStartedDocs/python/asgi.tsx +++ b/static/app/gettingStartedDocs/python/asgi.tsx @@ -46,9 +46,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/awslambda.spec.tsx b/static/app/gettingStartedDocs/python/awslambda.spec.tsx index ae9a40210a7363..feab788051042d 100644 --- a/static/app/gettingStartedDocs/python/awslambda.spec.tsx +++ b/static/app/gettingStartedDocs/python/awslambda.spec.tsx @@ -42,7 +42,10 @@ describe('awslambda onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -71,7 +74,10 @@ describe('awslambda onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).toBeInTheDocument(); + expect( + screen.getByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/awslambda.tsx b/static/app/gettingStartedDocs/python/awslambda.tsx index f74d867e15f32a..112841b34628db 100644 --- a/static/app/gettingStartedDocs/python/awslambda.tsx +++ b/static/app/gettingStartedDocs/python/awslambda.tsx @@ -54,9 +54,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/bottle.spec.tsx b/static/app/gettingStartedDocs/python/bottle.spec.tsx index 65f35d479c2d91..4c418b976e9bc6 100644 --- a/static/app/gettingStartedDocs/python/bottle.spec.tsx +++ b/static/app/gettingStartedDocs/python/bottle.spec.tsx @@ -44,7 +44,10 @@ describe('bottle onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -74,10 +77,15 @@ describe('bottle onboarding docs', function () { ).not.toBeInTheDocument(); // Does render continuous profiling config - const matches = screen.getAllByText( - textWithMarkupMatcher(/profile_lifecycle: "trace",/) + const sampleRateMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); - expect(matches.length).toBeGreaterThan(0); - matches.forEach(match => expect(match).toBeInTheDocument()); + expect(sampleRateMatches.length).toBeGreaterThan(0); + sampleRateMatches.forEach(match => expect(match).toBeInTheDocument()); + const lifeCycleMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_lifecycle="trace",/) + ); + expect(lifeCycleMatches.length).toBeGreaterThan(0); + lifeCycleMatches.forEach(match => expect(match).toBeInTheDocument()); }); }); diff --git a/static/app/gettingStartedDocs/python/bottle.tsx b/static/app/gettingStartedDocs/python/bottle.tsx index f441dbd0279724..1ea377e4fbd1bb 100644 --- a/static/app/gettingStartedDocs/python/bottle.tsx +++ b/static/app/gettingStartedDocs/python/bottle.tsx @@ -46,9 +46,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/celery.spec.tsx b/static/app/gettingStartedDocs/python/celery.spec.tsx index d1674989dbb206..6f0469a8418907 100644 --- a/static/app/gettingStartedDocs/python/celery.spec.tsx +++ b/static/app/gettingStartedDocs/python/celery.spec.tsx @@ -46,10 +46,10 @@ describe('celery onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); expect( - screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -78,10 +78,10 @@ describe('celery onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) ).toBeInTheDocument(); expect( - screen.getByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) + screen.getByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/celery.tsx b/static/app/gettingStartedDocs/python/celery.tsx index a6ddc8bf38b836..73cde35dfe31cd 100644 --- a/static/app/gettingStartedDocs/python/celery.tsx +++ b/static/app/gettingStartedDocs/python/celery.tsx @@ -43,24 +43,20 @@ sentry_sdk.init( # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profile_session_sample_rate=1.0,` - : '' + profiles_sample_rate=1.0,` + : params.isProfilingSelected && + params.profilingOptions?.defaultProfilingMode === 'continuous' + ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle="trace",` + : '' } -)${ - params.isProfilingSelected && - params.profilingOptions?.defaultProfilingMode === 'continuous' - ? ` - -# Manually call start_profiler and stop_profiler -# to profile the code in between -sentry_sdk.profiler.start_profiler() -# this code will be profiled -# -# Calls to stop_profiler are optional - if you don't stop the profiler, it will keep profiling -# your application until the process exits or stop_profiler is called. -sentry_sdk.profiler.stop_profiler()` - : '' -}`; +) +`; const onboarding: OnboardingConfig = { introduction: () => diff --git a/static/app/gettingStartedDocs/python/chalice.spec.tsx b/static/app/gettingStartedDocs/python/chalice.spec.tsx index 14fb35f2f56891..d6e42474d97b6c 100644 --- a/static/app/gettingStartedDocs/python/chalice.spec.tsx +++ b/static/app/gettingStartedDocs/python/chalice.spec.tsx @@ -44,7 +44,10 @@ describe('chalice onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -73,7 +76,10 @@ describe('chalice onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).toBeInTheDocument(); + expect( + screen.getByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/chalice.tsx b/static/app/gettingStartedDocs/python/chalice.tsx index ba5bdc22e24db4..268bf221e705a5 100644 --- a/static/app/gettingStartedDocs/python/chalice.tsx +++ b/static/app/gettingStartedDocs/python/chalice.tsx @@ -44,9 +44,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/django.spec.tsx b/static/app/gettingStartedDocs/python/django.spec.tsx index 9f8563a6d68dfd..f7ced15d4b350b 100644 --- a/static/app/gettingStartedDocs/python/django.spec.tsx +++ b/static/app/gettingStartedDocs/python/django.spec.tsx @@ -44,7 +44,10 @@ describe('django onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -73,7 +76,10 @@ describe('django onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).toBeInTheDocument(); + expect( + screen.getByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/django.tsx b/static/app/gettingStartedDocs/python/django.tsx index 756f28de8bbd0a..350ccbf86df40b 100644 --- a/static/app/gettingStartedDocs/python/django.tsx +++ b/static/app/gettingStartedDocs/python/django.tsx @@ -46,9 +46,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/falcon.spec.tsx b/static/app/gettingStartedDocs/python/falcon.spec.tsx index 3e5cde86048cd3..4c53205365b7a7 100644 --- a/static/app/gettingStartedDocs/python/falcon.spec.tsx +++ b/static/app/gettingStartedDocs/python/falcon.spec.tsx @@ -44,7 +44,10 @@ describe('falcon onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -74,10 +77,15 @@ describe('falcon onboarding docs', function () { ).not.toBeInTheDocument(); // Does render continuous profiling config - const matches = screen.getAllByText( - textWithMarkupMatcher(/profile_lifecycle: "trace",/) + const sampleRateMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); - expect(matches.length).toBeGreaterThan(0); - matches.forEach(match => expect(match).toBeInTheDocument()); + expect(sampleRateMatches.length).toBeGreaterThan(0); + sampleRateMatches.forEach(match => expect(match).toBeInTheDocument()); + const lifeCycleMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_lifecycle="trace",/) + ); + expect(lifeCycleMatches.length).toBeGreaterThan(0); + lifeCycleMatches.forEach(match => expect(match).toBeInTheDocument()); }); }); diff --git a/static/app/gettingStartedDocs/python/falcon.tsx b/static/app/gettingStartedDocs/python/falcon.tsx index ca8bcf9d95f5df..473adcd87e53b7 100644 --- a/static/app/gettingStartedDocs/python/falcon.tsx +++ b/static/app/gettingStartedDocs/python/falcon.tsx @@ -47,9 +47,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/fastapi.spec.tsx b/static/app/gettingStartedDocs/python/fastapi.spec.tsx index f0b25b212f3cdd..79afa290a20ba5 100644 --- a/static/app/gettingStartedDocs/python/fastapi.spec.tsx +++ b/static/app/gettingStartedDocs/python/fastapi.spec.tsx @@ -44,7 +44,10 @@ describe('flask onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -73,7 +76,10 @@ describe('flask onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).toBeInTheDocument(); + expect( + screen.getByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/fastapi.tsx b/static/app/gettingStartedDocs/python/fastapi.tsx index 24285547831c83..04238a4750fe69 100644 --- a/static/app/gettingStartedDocs/python/fastapi.tsx +++ b/static/app/gettingStartedDocs/python/fastapi.tsx @@ -49,9 +49,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/flask.spec.tsx b/static/app/gettingStartedDocs/python/flask.spec.tsx index 8f061729d90dba..5eab4aad472e11 100644 --- a/static/app/gettingStartedDocs/python/flask.spec.tsx +++ b/static/app/gettingStartedDocs/python/flask.spec.tsx @@ -44,7 +44,10 @@ describe('flask onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -74,10 +77,15 @@ describe('flask onboarding docs', function () { ).not.toBeInTheDocument(); // Does render continuous profiling config - const matches = screen.getAllByText( - textWithMarkupMatcher(/profile_lifecycle: "trace",/) + const sampleRateMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); - expect(matches.length).toBeGreaterThan(0); - matches.forEach(match => expect(match).toBeInTheDocument()); + expect(sampleRateMatches.length).toBeGreaterThan(0); + sampleRateMatches.forEach(match => expect(match).toBeInTheDocument()); + const lifeCycleMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_lifecycle="trace",/) + ); + expect(lifeCycleMatches.length).toBeGreaterThan(0); + lifeCycleMatches.forEach(match => expect(match).toBeInTheDocument()); }); }); diff --git a/static/app/gettingStartedDocs/python/flask.tsx b/static/app/gettingStartedDocs/python/flask.tsx index 35de2de5574da7..8b11135bd0f998 100644 --- a/static/app/gettingStartedDocs/python/flask.tsx +++ b/static/app/gettingStartedDocs/python/flask.tsx @@ -48,9 +48,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx b/static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx index a8b36b490879e0..0d17035ae4721b 100644 --- a/static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx +++ b/static/app/gettingStartedDocs/python/gcpfunctions.spec.tsx @@ -42,7 +42,10 @@ describe('gcpfunctions onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -71,7 +74,10 @@ describe('gcpfunctions onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).toBeInTheDocument(); + expect( + screen.getByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/gcpfunctions.tsx b/static/app/gettingStartedDocs/python/gcpfunctions.tsx index 8e362827e76fe3..642757e32ae557 100644 --- a/static/app/gettingStartedDocs/python/gcpfunctions.tsx +++ b/static/app/gettingStartedDocs/python/gcpfunctions.tsx @@ -48,9 +48,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/python.tsx b/static/app/gettingStartedDocs/python/python.tsx index 59f2227606dbc8..721e7c961741d8 100644 --- a/static/app/gettingStartedDocs/python/python.tsx +++ b/static/app/gettingStartedDocs/python/python.tsx @@ -158,8 +158,14 @@ sentry_sdk.init( # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. + profiles_sample_rate=1.0,` + : params.isProfilingSelected && + params.profilingOptions?.defaultProfilingMode === 'continuous' + ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. profile_session_sample_rate=1.0,` - : '' + : '' } )${ params.isProfilingSelected && @@ -179,10 +185,11 @@ def fast_function(): # Manually call start_profiler and stop_profiler # to profile the code in between sentry_sdk.profiler.start_profiler() + for i in range(0, 10): slow_function() fast_function() -# + # Calls to stop_profiler are optional - if you don't stop the profiler, it will keep profiling # your application until the process exits or stop_profiler is called. sentry_sdk.profiler.stop_profiler()` diff --git a/static/app/gettingStartedDocs/python/quart.spec.tsx b/static/app/gettingStartedDocs/python/quart.spec.tsx index 8110fe982399cf..a83b2e19d3a914 100644 --- a/static/app/gettingStartedDocs/python/quart.spec.tsx +++ b/static/app/gettingStartedDocs/python/quart.spec.tsx @@ -44,7 +44,10 @@ describe('quart onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -74,10 +77,15 @@ describe('quart onboarding docs', function () { ).not.toBeInTheDocument(); // Does render continuous profiling config - const matches = screen.getAllByText( - textWithMarkupMatcher(/profile_lifecycle: "trace",/) + const sampleRateMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); - expect(matches.length).toBeGreaterThan(0); - matches.forEach(match => expect(match).toBeInTheDocument()); + expect(sampleRateMatches.length).toBeGreaterThan(0); + sampleRateMatches.forEach(match => expect(match).toBeInTheDocument()); + const lifeCycleMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_lifecycle="trace",/) + ); + expect(lifeCycleMatches.length).toBeGreaterThan(0); + lifeCycleMatches.forEach(match => expect(match).toBeInTheDocument()); }); }); diff --git a/static/app/gettingStartedDocs/python/quart.tsx b/static/app/gettingStartedDocs/python/quart.tsx index 846fba5a1dc939..63dd1b6c6b4818 100644 --- a/static/app/gettingStartedDocs/python/quart.tsx +++ b/static/app/gettingStartedDocs/python/quart.tsx @@ -49,9 +49,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/rq.spec.tsx b/static/app/gettingStartedDocs/python/rq.spec.tsx index 6fc06c6a3110d8..8e87ff1f8a2ed4 100644 --- a/static/app/gettingStartedDocs/python/rq.spec.tsx +++ b/static/app/gettingStartedDocs/python/rq.spec.tsx @@ -47,10 +47,10 @@ describe('rq onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0/)) ).not.toBeInTheDocument(); expect( - screen.queryByText(textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/)) + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace"/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -80,16 +80,15 @@ describe('rq onboarding docs', function () { ).not.toBeInTheDocument(); // Does render continuous profiling config - const startMatches = screen.queryAllByText( - textWithMarkupMatcher(/sentry_sdk.profiler.start_profiler\(\)/) + const sampleRateMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); - expect(startMatches.length).toBeGreaterThan(0); - startMatches.forEach(match => expect(match).toBeInTheDocument()); - - const stopMatches = screen.queryAllByText( - textWithMarkupMatcher(/sentry_sdk.profiler.stop_profiler\(\)/) + expect(sampleRateMatches.length).toBeGreaterThan(0); + sampleRateMatches.forEach(match => expect(match).toBeInTheDocument()); + const lifeCycleMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_lifecycle="trace",/) ); - expect(stopMatches.length).toBeGreaterThan(0); - stopMatches.forEach(match => expect(match).toBeInTheDocument()); + expect(lifeCycleMatches.length).toBeGreaterThan(0); + lifeCycleMatches.forEach(match => expect(match).toBeInTheDocument()); }); }); diff --git a/static/app/gettingStartedDocs/python/rq.tsx b/static/app/gettingStartedDocs/python/rq.tsx index 8fee095afd1812..01037f3c18af1a 100644 --- a/static/app/gettingStartedDocs/python/rq.tsx +++ b/static/app/gettingStartedDocs/python/rq.tsx @@ -36,24 +36,20 @@ sentry_sdk.init( # Set profile_session_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profile_session_sample_rate=1.0,` - : '' + profiles_sample_rate=1.0,` + : params.isProfilingSelected && + params.profilingOptions?.defaultProfilingMode === 'continuous' + ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, + # Set profile_lifecycle to "trace" to automatically + # run the profiler on when there is an active transaction + profile_lifecycle="trace",` + : '' } -)${ - params.isProfilingSelected && - params.profilingOptions?.defaultProfilingMode === 'continuous' - ? ` - -# Manually call start_profiler and stop_profiler -# to profile the code in between -sentry_sdk.profiler.start_profiler() -# this code will be profiled -# -# Calls to stop_profiler are optional - if you don't stop the profiler, it will keep profiling -# your application until the process exits or stop_profiler is called. -sentry_sdk.profiler.stop_profiler()` - : '' -}`; +) +`; const getSdkSetupSnippet = (params: Params) => ` import sentry_sdk diff --git a/static/app/gettingStartedDocs/python/serverless.spec.tsx b/static/app/gettingStartedDocs/python/serverless.spec.tsx index 555109c4b439f9..6fc092b706cb43 100644 --- a/static/app/gettingStartedDocs/python/serverless.spec.tsx +++ b/static/app/gettingStartedDocs/python/serverless.spec.tsx @@ -42,7 +42,10 @@ describe('serverless onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -71,7 +74,10 @@ describe('serverless onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).toBeInTheDocument(); + expect( + screen.getByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/serverless.tsx b/static/app/gettingStartedDocs/python/serverless.tsx index 92b2c05b70febb..126cf78e120278 100644 --- a/static/app/gettingStartedDocs/python/serverless.tsx +++ b/static/app/gettingStartedDocs/python/serverless.tsx @@ -44,9 +44,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/starlette.spec.tsx b/static/app/gettingStartedDocs/python/starlette.spec.tsx index c0e5d6fa317d52..d54282447a92e2 100644 --- a/static/app/gettingStartedDocs/python/starlette.spec.tsx +++ b/static/app/gettingStartedDocs/python/starlette.spec.tsx @@ -44,7 +44,10 @@ describe('starlette onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -74,10 +77,15 @@ describe('starlette onboarding docs', function () { ).not.toBeInTheDocument(); // Does render continuous profiling config - const matches = screen.getAllByText( - textWithMarkupMatcher(/profile_lifecycle: "trace",/) + const sampleRateMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); - expect(matches.length).toBeGreaterThan(0); - matches.forEach(match => expect(match).toBeInTheDocument()); + expect(sampleRateMatches.length).toBeGreaterThan(0); + sampleRateMatches.forEach(match => expect(match).toBeInTheDocument()); + const lifeCycleMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_lifecycle="trace",/) + ); + expect(lifeCycleMatches.length).toBeGreaterThan(0); + lifeCycleMatches.forEach(match => expect(match).toBeInTheDocument()); }); }); diff --git a/static/app/gettingStartedDocs/python/starlette.tsx b/static/app/gettingStartedDocs/python/starlette.tsx index 7b830e2ddfeb19..c21be6ee9852e4 100644 --- a/static/app/gettingStartedDocs/python/starlette.tsx +++ b/static/app/gettingStartedDocs/python/starlette.tsx @@ -47,9 +47,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/tornado.spec.tsx b/static/app/gettingStartedDocs/python/tornado.spec.tsx index 98434383ab8c81..8edc7bf8955368 100644 --- a/static/app/gettingStartedDocs/python/tornado.spec.tsx +++ b/static/app/gettingStartedDocs/python/tornado.spec.tsx @@ -42,7 +42,10 @@ describe('tornado onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -72,10 +75,15 @@ describe('tornado onboarding docs', function () { ).not.toBeInTheDocument(); // Does render continuous profiling config - const matches = screen.getAllByText( - textWithMarkupMatcher(/profile_lifecycle: "trace",/) + const sampleRateMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/) ); - expect(matches.length).toBeGreaterThan(0); - matches.forEach(match => expect(match).toBeInTheDocument()); + expect(sampleRateMatches.length).toBeGreaterThan(0); + sampleRateMatches.forEach(match => expect(match).toBeInTheDocument()); + const lifeCycleMatches = screen.getAllByText( + textWithMarkupMatcher(/profile_lifecycle="trace",/) + ); + expect(lifeCycleMatches.length).toBeGreaterThan(0); + lifeCycleMatches.forEach(match => expect(match).toBeInTheDocument()); }); }); diff --git a/static/app/gettingStartedDocs/python/tornado.tsx b/static/app/gettingStartedDocs/python/tornado.tsx index 12201442eaed39..4045ec96b35ee7 100644 --- a/static/app/gettingStartedDocs/python/tornado.tsx +++ b/static/app/gettingStartedDocs/python/tornado.tsx @@ -46,9 +46,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/tryton.spec.tsx b/static/app/gettingStartedDocs/python/tryton.spec.tsx index 9bdbb4e4af4697..93a04bfc8a35f3 100644 --- a/static/app/gettingStartedDocs/python/tryton.spec.tsx +++ b/static/app/gettingStartedDocs/python/tryton.spec.tsx @@ -35,7 +35,10 @@ describe('tryton onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -64,7 +67,10 @@ describe('tryton onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).toBeInTheDocument(); + expect( + screen.getByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/tryton.tsx b/static/app/gettingStartedDocs/python/tryton.tsx index 9747e974e0f0c0..7a313c69295e47 100644 --- a/static/app/gettingStartedDocs/python/tryton.tsx +++ b/static/app/gettingStartedDocs/python/tryton.tsx @@ -40,9 +40,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) diff --git a/static/app/gettingStartedDocs/python/wsgi.spec.tsx b/static/app/gettingStartedDocs/python/wsgi.spec.tsx index 52b9162d75ae8e..6e54a33fa12b8d 100644 --- a/static/app/gettingStartedDocs/python/wsgi.spec.tsx +++ b/static/app/gettingStartedDocs/python/wsgi.spec.tsx @@ -42,7 +42,10 @@ describe('wsgi onboarding docs', function () { // Does not render continuous profiling config expect( - screen.queryByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).not.toBeInTheDocument(); + expect( + screen.queryByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).not.toBeInTheDocument(); // Does render transaction profiling config @@ -71,7 +74,10 @@ describe('wsgi onboarding docs', function () { // Does render continuous profiling config expect( - screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/)) + screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + ).toBeInTheDocument(); + expect( + screen.getByText(textWithMarkupMatcher(/profile_lifecycle="trace",/)) ).toBeInTheDocument(); }); }); diff --git a/static/app/gettingStartedDocs/python/wsgi.tsx b/static/app/gettingStartedDocs/python/wsgi.tsx index 3816305d341515..68750f61c5a8eb 100644 --- a/static/app/gettingStartedDocs/python/wsgi.tsx +++ b/static/app/gettingStartedDocs/python/wsgi.tsx @@ -46,9 +46,12 @@ sentry_sdk.init( : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` + # Set profile_session_sample_rate to 1.0 to profile 100% + # of profile sessions. + profile_session_sample_rate=1.0, # Set profile_lifecycle to "trace" to automatically # run the profiler on when there is an active transaction - profile_lifecycle: "trace",` + profile_lifecycle="trace",` : '' } ) From 1ea779c7b3b97aaab400984536db3aa673d735af Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Fri, 28 Mar 2025 17:28:24 -0400 Subject: [PATCH 5/6] undo unintentional change --- static/app/gettingStartedDocs/python/aiohttp.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/app/gettingStartedDocs/python/aiohttp.tsx b/static/app/gettingStartedDocs/python/aiohttp.tsx index dab1d698cffea5..d254d139f82010 100644 --- a/static/app/gettingStartedDocs/python/aiohttp.tsx +++ b/static/app/gettingStartedDocs/python/aiohttp.tsx @@ -41,10 +41,10 @@ sentry_sdk.init( params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode !== 'continuous' ? ` - # Set profile_session_sample_rate to 1.0 to profile 100% + # Set profiles_sample_rate to 1.0 to profile 100% # of sampled transactions. # We recommend adjusting this value in production. - profile_session_sample_rate=1.0,` + profiles_sample_rate=1.0,` : params.isProfilingSelected && params.profilingOptions?.defaultProfilingMode === 'continuous' ? ` From c3910f4700932ab2548ed1b365cef7e7f44f9089 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Fri, 28 Mar 2025 17:29:05 -0400 Subject: [PATCH 6/6] undo unintentional change --- static/app/gettingStartedDocs/python/aiohttp.spec.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/app/gettingStartedDocs/python/aiohttp.spec.tsx b/static/app/gettingStartedDocs/python/aiohttp.spec.tsx index 87233673016fff..8eab689bc0086f 100644 --- a/static/app/gettingStartedDocs/python/aiohttp.spec.tsx +++ b/static/app/gettingStartedDocs/python/aiohttp.spec.tsx @@ -28,7 +28,7 @@ describe('aiohttp onboarding docs', function () { // Does not render config option expect( - screen.queryByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/)) + screen.queryByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/)) ).not.toBeInTheDocument(); // Does not render config option