Skip to content

Commit 18e057d

Browse files
authored
Merge branch 'master' into tkdodo/ref/no-disable-eslint-plugin-query
2 parents 9eb63c8 + 01f5e5b commit 18e057d

File tree

12 files changed

+664
-624
lines changed

12 files changed

+664
-624
lines changed

static/app/gettingStartedDocs/javascript/nextjs.tsx

Lines changed: 0 additions & 623 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import {getNodeAgentMonitoringOnboarding} from 'sentry/gettingStartedDocs/node/node/utils';
2+
3+
export const agentMonitoring = getNodeAgentMonitoringOnboarding({
4+
packageName: '@sentry/nextjs',
5+
configFileName: 'sentry.server.config.ts',
6+
});
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import {widgetCalloutBlock} from 'sentry/components/onboarding/gettingStartedDoc/feedback/widgetCallout';
2+
import type {
3+
DocsParams,
4+
OnboardingConfig,
5+
} from 'sentry/components/onboarding/gettingStartedDoc/types';
6+
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types';
7+
import {
8+
getCrashReportJavaScriptInstallSteps,
9+
getCrashReportModalConfigDescription,
10+
getCrashReportModalIntroduction,
11+
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
12+
13+
export const crashReport: OnboardingConfig = {
14+
introduction: () => getCrashReportModalIntroduction(),
15+
install: (params: DocsParams) => getCrashReportJavaScriptInstallSteps(params),
16+
configure: () => [
17+
{
18+
type: StepType.CONFIGURE,
19+
content: [
20+
{
21+
type: 'text',
22+
text: getCrashReportModalConfigDescription({
23+
link: 'https://docs.sentry.io/platforms/javascript/guides/nextjs/user-feedback/configuration/#crash-report-modal',
24+
}),
25+
},
26+
widgetCalloutBlock({
27+
link: 'https://docs.sentry.io/platforms/javascript/guides/nextjs/user-feedback/#user-feedback-widget',
28+
}),
29+
],
30+
},
31+
],
32+
verify: () => [],
33+
nextSteps: () => [],
34+
};
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
import crashReportCallout from 'sentry/components/onboarding/gettingStartedDoc/feedback/crashReportCallout';
2+
import type {
3+
DocsParams,
4+
OnboardingConfig,
5+
} from 'sentry/components/onboarding/gettingStartedDoc/types';
6+
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types';
7+
import {
8+
getFeedbackConfigureDescription,
9+
getFeedbackSDKSetupSnippet,
10+
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
11+
import {t, tct} from 'sentry/locale';
12+
13+
import {getInstallSnippet} from './utils';
14+
15+
export const feedback: OnboardingConfig = {
16+
install: (params: DocsParams) => [
17+
{
18+
type: StepType.INSTALL,
19+
content: [
20+
{
21+
type: 'text',
22+
text: tct(
23+
'For the User Feedback integration to work, you must have the Sentry browser SDK package, or an equivalent framework SDK (e.g. [code:@sentry/nextjs]) installed, minimum version 7.85.0.',
24+
{
25+
code: <code />,
26+
}
27+
),
28+
},
29+
{
30+
type: 'text',
31+
text: t('Install the Next.js SDK using our installation wizard:'),
32+
},
33+
{
34+
type: 'code',
35+
language: 'bash',
36+
code: getInstallSnippet(params),
37+
},
38+
],
39+
},
40+
],
41+
configure: (params: DocsParams) => [
42+
{
43+
type: StepType.CONFIGURE,
44+
content: [
45+
{
46+
type: 'text',
47+
text: getFeedbackConfigureDescription({
48+
linkConfig:
49+
'https://docs.sentry.io/platforms/javascript/guides/nextjs/user-feedback/configuration/',
50+
linkButton:
51+
'https://docs.sentry.io/platforms/javascript/guides/nextjs/user-feedback/configuration/#bring-your-own-button',
52+
}),
53+
},
54+
{
55+
type: 'code',
56+
tabs: [
57+
{
58+
label: 'JavaScript',
59+
filename: 'instrumentation-client.(js|ts)',
60+
language: 'javascript',
61+
code: getFeedbackSDKSetupSnippet({
62+
importStatement: `import * as Sentry from "@sentry/nextjs";`,
63+
dsn: params.dsn.public,
64+
feedbackOptions: params.feedbackOptions,
65+
}),
66+
},
67+
],
68+
},
69+
{
70+
type: 'text',
71+
text: tct(
72+
'Note: The User Feedback integration only needs to be added to your [code:instrumentation-client.(js|ts)] file. Adding it to any server-side configuration files (like [code:instrumentation.(js|ts)]) will break your build because the Feedback integration depends on Browser APIs.',
73+
{
74+
code: <code />,
75+
}
76+
),
77+
},
78+
{
79+
type: 'custom',
80+
content: crashReportCallout({
81+
link: 'https://docs.sentry.io/platforms/javascript/guides/nextjs/user-feedback/#crash-report-modal',
82+
}),
83+
},
84+
],
85+
},
86+
],
87+
verify: () => [],
88+
nextSteps: () => [],
89+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types';
2+
import {featureFlag} from 'sentry/gettingStartedDocs/javascript/javascript/featureFlag';
3+
4+
import {agentMonitoring} from './agentMonitoring';
5+
import {crashReport} from './crashReport';
6+
import {feedback} from './feedback';
7+
import {logs} from './logs';
8+
import {onboarding} from './onboarding';
9+
import {performance} from './performance';
10+
import {profiling} from './profiling';
11+
import {replay} from './replay';
12+
13+
const docs: Docs = {
14+
onboarding,
15+
feedbackOnboardingNpm: feedback,
16+
replayOnboarding: replay,
17+
performanceOnboarding: performance,
18+
crashReportOnboarding: crashReport,
19+
featureFlagOnboarding: featureFlag,
20+
profilingOnboarding: profiling,
21+
logsOnboarding: logs,
22+
agentMonitoringOnboarding: agentMonitoring,
23+
};
24+
25+
export default docs;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import {getJavascriptLogsFullStackOnboarding} from 'sentry/utils/gettingStartedDocs/javascript';
2+
3+
export const logs = getJavascriptLogsFullStackOnboarding({
4+
docsPlatform: 'nextjs',
5+
packageName: '@sentry/nextjs',
6+
});

static/app/gettingStartedDocs/javascript/nextjs.spec.tsx renamed to static/app/gettingStartedDocs/javascript/nextjs/onboarding.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {textWithMarkupMatcher} from 'sentry-test/utils';
44

55
import {ProductSolution} from 'sentry/components/onboarding/gettingStartedDoc/types';
66

7-
import docs from './nextjs';
7+
import docs from '.';
88

99
describe('javascript-nextjs onboarding docs', () => {
1010
it('renders onboarding docs correctly', () => {

0 commit comments

Comments
 (0)