import ExternalLink from 'sentry/components/links/externalLink'; 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 = ({ dsn, }: { dsn?: string; } = {}): LayoutProps['steps'] => [ { type: StepType.INSTALL, description: (
{tct(
'Sentry captures data by using an SDK within your application’s runtime. Add the following to your [pubspec: pubspec.yaml]',
{
pubspec: ,
}
)}
{tct('Import [sentryFlutter: sentry_flutter] and initialize it', {
sentryFlutter: ,
})}
{tct(
'You can configure the [sentryDsn: SENTRY_DSN], [sentryRelease: SENTRY_RELEASE], [sentryDist: SENTRY_DIST], and [sentryEnv: SENTRY_ENVIRONMENT] via the Dart environment variables passing the [dartDefine: --dart-define] flag to the compiler, as noted in the code sample.',
{
sentryDsn: ,
sentryRelease:
,
sentryDist:
,
sentryEnv:
,
dartDefine:
,
}
)}
{tct(
"If you're new to Sentry, use the email alert to access your account and complete a product tour.[break] If you're an existing user and have disabled alerts, you won't receive this email.",
{
break:
,
}
)}
{tct(
'To learn more about the API and automatic instrumentations, check out the [perfDocs: performance documentation].',
{
perfDocs: (
{tct(
"Complete stack traces will be shown for your Dart error by default, but if you use [splitDebugInfo: split-debug-info] and [obfuscate: obfuscate], you'll need to [uploadDebugSymbols: upload the debug information files] generated by the [flutter: flutter] build.",
{
splitDebugInfo: ,
obfuscate:
,
uploadDebugSymbols: (
,
}
)}
{tct(
"You'll also need to [uploadDebug: upload the debug information files] generated by the [flutter: flutter] build for iOS, macOS, and Android NDK native crashes.",
{
uploadDebug: (
,
}
)}
{tct( "If Sentry has access to your application's source code, it can show snippets of code [sourceContext: source context] around the location of stack frames, which helps to quickly pinpoint problematic code.", { sourceContext: , } )}
), }, { description: (
{tct(
"To enable source context, you'll need to upload debug symbols to Sentry by following the [sourceContext: Uploading Source Code Context for Flutter Android, iOS, and macOS] guide.",
{
sourceContext: (