11import { ExternalLink } from 'sentry/components/core/link' ;
22import type {
3- Docs ,
43 DocsParams ,
54 OnboardingConfig ,
65} from 'sentry/components/onboarding/gettingStartedDoc/types' ;
76import { StepType } from 'sentry/components/onboarding/gettingStartedDoc/types' ;
87import { getUploadSourceMapsStep } from 'sentry/components/onboarding/gettingStartedDoc/utils' ;
9- import {
10- getCrashReportApiIntroduction ,
11- getCrashReportInstallDescription ,
12- getCrashReportJavaScriptInstallSteps ,
13- getCrashReportModalConfigDescription ,
14- getCrashReportModalIntroduction ,
15- } from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding' ;
16- import { t , tct } from 'sentry/locale' ;
178import {
189 getImportInstrumentSnippet ,
1910 getInstallCodeBlock ,
20- getNodeAgentMonitoringOnboarding ,
21- getNodeLogsOnboarding ,
22- getNodeMcpOnboarding ,
23- getNodeProfilingOnboarding ,
2411 getSdkInitSnippet ,
2512 getSentryImportSnippet ,
26- } from 'sentry/utils/gettingStartedDocs/node' ;
27-
28- type Params = DocsParams ;
13+ } from 'sentry/gettingStartedDocs/node/node/utils' ;
14+ import { t , tct } from 'sentry/locale' ;
2915
3016const getSdkSetupSnippet = ( ) => `
3117${ getImportInstrumentSnippet ( ) }
@@ -49,7 +35,7 @@ const init = async () => {
4935init();
5036` ;
5137
52- const getVerifySnippet = ( params : Params ) => `
38+ const getVerifySnippet = ( params : DocsParams ) => `
5339server.route({
5440 method: 'GET',
5541 path: '/debug-sentry',
@@ -67,7 +53,7 @@ server.route({
6753});
6854` ;
6955
70- const onboarding : OnboardingConfig = {
56+ export const onboarding : OnboardingConfig = {
7157 introduction : ( ) =>
7258 tct ( "In this quick guide you'll use [strong:npm] or [strong:yarn] to set up:" , {
7359 strong : < strong /> ,
@@ -142,7 +128,7 @@ const onboarding: OnboardingConfig = {
142128 ...params ,
143129 } ) ,
144130 ] ,
145- verify : ( params : Params ) => [
131+ verify : ( params : DocsParams ) => [
146132 {
147133 type : StepType . VERIFY ,
148134 content : [
@@ -160,7 +146,7 @@ const onboarding: OnboardingConfig = {
160146 ] ,
161147 } ,
162148 ] ,
163- nextSteps : ( params : Params ) => {
149+ nextSteps : ( params : DocsParams ) => {
164150 const steps = [ ] ;
165151
166152 if ( params . isLogsSelected ) {
@@ -177,78 +163,3 @@ const onboarding: OnboardingConfig = {
177163 return steps ;
178164 } ,
179165} ;
180-
181- const feedbackOnboardingNode : OnboardingConfig = {
182- introduction : ( ) => getCrashReportApiIntroduction ( ) ,
183- install : ( ) => [
184- {
185- type : StepType . INSTALL ,
186- content : [
187- {
188- type : 'text' ,
189- text : getCrashReportInstallDescription ( ) ,
190- } ,
191- {
192- type : 'code' ,
193- tabs : [
194- {
195- label : 'JavaScript' ,
196- language : 'javascript' ,
197- code : `import * as Sentry from "@sentry/node";
198-
199- const eventId = Sentry.captureMessage("User Feedback");
200- // OR: const eventId = Sentry.lastEventId();
201-
202- const userFeedback = {
203- event_id: eventId,
204- name: "John Doe",
205- email: "john@doe.com",
206- comments: "I really like your App, thanks!",
207- };
208- Sentry.captureUserFeedback(userFeedback);
209- ` ,
210- } ,
211- ] ,
212- } ,
213- ] ,
214- } ,
215- ] ,
216- configure : ( ) => [ ] ,
217- verify : ( ) => [ ] ,
218- nextSteps : ( ) => [ ] ,
219- } ;
220-
221- const crashReportOnboarding : OnboardingConfig = {
222- introduction : ( ) => getCrashReportModalIntroduction ( ) ,
223- install : ( params : Params ) => getCrashReportJavaScriptInstallSteps ( params ) ,
224- configure : ( ) => [
225- {
226- type : StepType . CONFIGURE ,
227- content : [
228- {
229- type : 'text' ,
230- text : getCrashReportModalConfigDescription ( {
231- link : 'https://docs.sentry.io/platforms/javascript/guides/hapi/user-feedback/configuration/#crash-report-modal' ,
232- } ) ,
233- } ,
234- ] ,
235- } ,
236- ] ,
237- verify : ( ) => [ ] ,
238- nextSteps : ( ) => [ ] ,
239- } ;
240-
241- const docs : Docs = {
242- onboarding,
243- feedbackOnboardingCrashApi : feedbackOnboardingNode ,
244- crashReportOnboarding,
245- logsOnboarding : getNodeLogsOnboarding ( {
246- docsPlatform : 'hapi' ,
247- packageName : '@sentry/node' ,
248- } ) ,
249- profilingOnboarding : getNodeProfilingOnboarding ( ) ,
250- agentMonitoringOnboarding : getNodeAgentMonitoringOnboarding ( ) ,
251- mcpOnboarding : getNodeMcpOnboarding ( ) ,
252- } ;
253-
254- export default docs ;
0 commit comments