Skip to content
12 changes: 5 additions & 7 deletions static/app/gettingStartedDocs/python/aiohttp.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -42,14 +42,12 @@ 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
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());
Expand All @@ -70,12 +68,12 @@ 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
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());
Expand Down
13 changes: 5 additions & 8 deletions static/app/gettingStartedDocs/python/aiohttp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,16 @@ 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'
? `
_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",`
: ''
}
)
Expand Down
12 changes: 5 additions & 7 deletions static/app/gettingStartedDocs/python/asgi.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -42,14 +42,12 @@ 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
expect(
screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/))
screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/))
).toBeInTheDocument();
});

Expand All @@ -68,12 +66,12 @@ 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
expect(
screen.getByText(textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/))
screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/))
).toBeInTheDocument();
});
});
13 changes: 5 additions & 8 deletions static/app/gettingStartedDocs/python/asgi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,16 @@ 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'
? `
_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",`
: ''
}
)
Expand Down
12 changes: 5 additions & 7 deletions static/app/gettingStartedDocs/python/awslambda.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -42,14 +42,12 @@ 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
expect(
screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/))
screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/))
).toBeInTheDocument();
});

Expand All @@ -68,12 +66,12 @@ 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
expect(
screen.getByText(textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/))
screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/))
).toBeInTheDocument();
});
});
13 changes: 5 additions & 8 deletions static/app/gettingStartedDocs/python/awslambda.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,16 @@ 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'
? `
_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",`
: ''
}
)
Expand Down
12 changes: 5 additions & 7 deletions static/app/gettingStartedDocs/python/bottle.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -44,14 +44,12 @@ 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
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());
Expand All @@ -72,12 +70,12 @@ 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
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());
Expand Down
13 changes: 5 additions & 8 deletions static/app/gettingStartedDocs/python/bottle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,16 @@ 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'
? `
_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",`
: ''
}
)
Expand Down
22 changes: 15 additions & 7 deletions static/app/gettingStartedDocs/python/celery.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -46,15 +46,19 @@ 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
expect(
screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/))
screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/))
).toBeInTheDocument();
});

Expand All @@ -73,15 +77,19 @@ 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
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();
});
});
14 changes: 7 additions & 7 deletions static/app/gettingStartedDocs/python/celery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,25 @@ 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'
? `

# 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()`
: ''
}`;

Expand Down
12 changes: 5 additions & 7 deletions static/app/gettingStartedDocs/python/chalice.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -44,14 +44,12 @@ 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
expect(
screen.getByText(textWithMarkupMatcher(/profiles_sample_rate=1\.0,/))
screen.getByText(textWithMarkupMatcher(/profile_session_sample_rate=1\.0,/))
).toBeInTheDocument();
});

Expand All @@ -70,12 +68,12 @@ 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
expect(
screen.getByText(textWithMarkupMatcher(/"continuous_profiling_auto_start": True,/))
screen.getByText(textWithMarkupMatcher(/profile_lifecycle: "trace",/))
).toBeInTheDocument();
});
});
Loading
Loading