,
serverCode:
,
sentryInitCode:
,
}
)}
,
}
)}
,
sentryPropertiesCode:
,
}
)}
,
})}
{tct(
'Alternatively, you can also [manualSetupLink:set up the SDK manually].',
{
manualSetupLink: (
{tct(
"If you already have the configuration for Sentry in your application, and just need this project's ([projectSlug]) DSN, you can find it below:",
{
projectSlug: {params.projectSlug}
,
}
)}
, sentryServer:
, sentryEdge:
}
)}
,
}
),
configurations: getInstallConfig(),
},
],
configure: (params: Params) => [
{
type: StepType.CONFIGURE,
description: getFeedbackConfigureDescription({
linkConfig:
'https://docs.sentry.io/platforms/javascript/guides/nextjs/user-feedback/configuration/',
linkButton:
'https://docs.sentry.io/platforms/javascript/guides/nextjs/user-feedback/configuration/#bring-your-own-button',
}),
configurations: [
{
code: [
{
label: 'JavaScript',
value: 'javascript',
language: 'javascript',
code: getFeedbackSDKSetupSnippet({
importStatement: `import * as Sentry from "@sentry/nextjs";`,
dsn: params.dsn,
feedbackOptions: params.feedbackOptions,
}),
},
],
},
],
additionalInfo: crashReportCallout({
link: 'https://docs.sentry.io/platforms/javascript/guides/nextjs/user-feedback/#crash-report-modal',
}),
},
],
verify: () => [],
nextSteps: () => [],
};
const crashReportOnboarding: OnboardingConfig = {
introduction: () => getCrashReportModalIntroduction(),
install: (params: Params) => getCrashReportJavaScriptInstallStep(params),
configure: () => [
{
type: StepType.CONFIGURE,
description: getCrashReportModalConfigDescription({
link: 'https://docs.sentry.io/platforms/javascript/guides/nextjs/user-feedback/configuration/#crash-report-modal',
}),
additionalInfo: widgetCallout({
link: 'https://docs.sentry.io/platforms/javascript/guides/nextjs/user-feedback/#user-feedback-widget',
}),
},
],
verify: () => [],
nextSteps: () => [],
};
const docs: Docs = {
onboarding,
feedbackOnboardingNpm: feedbackOnboarding,
replayOnboardingNpm: replayOnboarding,
customMetricsOnboarding: getJSMetricsOnboarding({
getInstallConfig: getManualInstallConfig,
}),
crashReportOnboarding,
};
export default docs;
const DSNText = styled('div')`
margin-bottom: ${space(0.5)};
`;
const ManualSetupTitle = styled('p')`
font-size: ${p => p.theme.fontSizeLarge};
font-weight: bold;
`;