,
sentryBotteCode:
,
}
),
configurations: [
{
description: params.isProfilingSelected
? tct(
'You need a minimum version [codeVersion:1.18.0] of the [codePackage:sentry-python] SDK for the profiling feature.',
{
codeVersion:
,
codePackage:
,
}
)
: undefined,
language: 'bash',
code: getInstallSnippet(),
},
],
},
],
configure: (params: Params) => [
{
type: StepType.CONFIGURE,
description: tct(
'If you have the [code:bottle] package in your dependencies, the Bottle integration will be enabled automatically when you initialize the Sentry SDK. Initialize the Sentry SDK before your app has been initialized:',
{
code:
,
}
),
configurations: [
{
language: 'python',
code: `from bottle import Bottle
${getSdkSetupSnippet(params)}
app = Bottle()
`,
},
],
},
],
verify: (params: Params) => [
{
type: StepType.VERIFY,
description: t(
'To verify that everything is working, trigger an error on purpose:'
),
configurations: [
{
language: 'python',
code: `from bottle import Bottle, run
${getSdkSetupSnippet(params)}
app = Bottle()
@app.route('/')
def hello():
1/0
return "Hello World!"
run(app, host='localhost', port=8000)
`,
},
],
additionalInfo: (
{tct(
'When you point your browser to [link:http://localhost:8000/] a transaction in the Performance section of Sentry will be created.',
{
link:
{t( 'Additionally, an error event will be sent to Sentry and will be connected to the transaction.' )}
{t('It takes a couple of moments for the data to appear in Sentry.')}
), }, ], nextSteps: () => [], }; const docs: Docs = { onboarding, replayOnboardingJsLoader, customMetricsOnboarding: getPythonMetricsOnboarding({ installSnippet: getInstallSnippet(), }), crashReportOnboarding: crashReportOnboardingPython, }; export default docs;