import {Layout, LayoutProps} from 'sentry/components/onboarding/gettingStartedDoc/layout'; import {ModuleProps} from 'sentry/components/onboarding/gettingStartedDoc/sdkDocumentation'; import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/step'; import {t, tct} from 'sentry/locale'; // Configuration Start export const steps = ({ sentryInitContent, }: { sentryInitContent: string; }): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: (
{tct(
'Install [sentrySdkCode:sentry-sdk] from PyPI with the [sentryBotteCode:chalice] extra:',
{
sentrySdkCode: ,
sentryBotteCode:
,
}
)}
{t('To verify that everything is working trigger an error on purpose:')}
), configurations: [ { language: 'python', code: `from chalice import Chalice sentry_sdk.init( ${sentryInitContent} ) app = Chalice(app_name="helloworld") @app.schedule(Rate(1, unit=Rate.MINUTES)) def every_minute(event): 1/0 # raises an error @app.route("/") def index(): 1/0 # raises an error return {"hello": "world"}`, }, ], additionalInfo: (
{tct(
'When you enter the [code:"/"] route or the scheduled task is run, an error event will be sent to Sentry.',
{
code: ,
}
)}