import {Fragment} from 'react';
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
const introduction = tct(
'This guide is for Laravel 8+. We also provide instructions for [otherVersionsLink:other versions] as well as [lumenSpecificLink:Lumen-specific instructions].',
{
otherVersionsLink: (
{tct('Install the [code:sentry/sentry-laravel] package:', {
code: ,
})}
{tct(
'Enable capturing unhandled exception to report to Sentry by making the following change to your [code:App/Exceptions/Handler.php]:',
{
code: ,
}
)}
{tct(
'Alternatively, you can configure Sentry in your [laravelLogChannelLink:Laravel Log Channel], allowing you to log [code:info] and [code:debug] as well.',
{
code: ,
laravelLogChannelLink: (
{tct(
'It creates the config file ([code:config/sentry.php]) and adds the [code:DSN] to your ".env" file.',
{code: }
)}
{tct(
'You can test your configuration using the provided [code:sentry:test] artisan command:',
{
code: ,
}
)}
{tct(
'Set [code:traces_sample_rate] in [code:config/sentry.php] or [code:SENTRY_TRACES_SAMPLE_RATE] in your ".env" to a value greater than "0.0". Setting a value greater than "0.0" will enable Performance Monitoring, "0" (the default) will disable Performance Monitoring.',
{code: }
)}
{tct(
'You can also be more granular with the sample rate by using the traces_sampler option. Learn more in [usingSampleToFilterLink:Using Sampling to Filter Transaction Events].',
{
usingSampleToFilterLink: (
{tct(
"Performance data is transmitted using a new event type called 'transactions', which you can learn about in Distributed Tracing.",
{
distributedTracingLink: (
{tct(
"You most likely don't want errors to be sent to Sentry when you are developing or running tests. To avoid this, set the DSN value to [code:null] to disable sending errors to Sentry.",
{
code: ,
}
)}
{tct(
'You can also do this by not defining [code:SENTRY_LARAVEL_DSN] in your [code:.env] or by defining it as [code:SENTRY_LARAVEL_DSN=null].',
{code: }
)}
{t( "If you do leave Sentry enabled when developing or running tests, it's possible for it to have a negative effect on the performance of your application or test suite." )}