|
@@ -1,5 +1,6 @@
|
|
|
import ExternalLink from 'sentry/components/links/externalLink';
|
|
|
import crashReportCallout from 'sentry/components/onboarding/gettingStartedDoc/feedback/crashReportCallout';
|
|
|
+import widgetCallout from 'sentry/components/onboarding/gettingStartedDoc/feedback/widgetCallout';
|
|
|
import TracePropagationMessage from 'sentry/components/onboarding/gettingStartedDoc/replay/tracePropagationMessage';
|
|
|
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/step';
|
|
|
import type {
|
|
@@ -9,6 +10,9 @@ import type {
|
|
|
} from 'sentry/components/onboarding/gettingStartedDoc/types';
|
|
|
import {getUploadSourceMapsStep} from 'sentry/components/onboarding/gettingStartedDoc/utils';
|
|
|
import {
|
|
|
+ getCrashReportModalConfigDescription,
|
|
|
+ getCrashReportModalInstallDescriptionJavaScript,
|
|
|
+ getCrashReportModalIntroduction,
|
|
|
getFeedbackConfigureDescription,
|
|
|
getFeedbackSDKSetupSnippet,
|
|
|
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
|
|
@@ -298,11 +302,59 @@ const feedbackOnboarding: OnboardingConfig = {
|
|
|
nextSteps: () => [],
|
|
|
};
|
|
|
|
|
|
+const crashReportOnboarding: OnboardingConfig = {
|
|
|
+ introduction: () => getCrashReportModalIntroduction(),
|
|
|
+ install: (params: Params) => [
|
|
|
+ {
|
|
|
+ type: StepType.INSTALL,
|
|
|
+ description: getCrashReportModalInstallDescriptionJavaScript(),
|
|
|
+ configurations: [
|
|
|
+ {
|
|
|
+ code: [
|
|
|
+ {
|
|
|
+ label: 'JavaScript',
|
|
|
+ value: 'javascript',
|
|
|
+ language: 'javascript',
|
|
|
+ code: `const { init, showReportDialog } = require("@sentry/electron");
|
|
|
+
|
|
|
+init({
|
|
|
+ dsn: "${params.dsn}",
|
|
|
+ beforeSend(event) {
|
|
|
+ // Check if it is an exception, if so, show the report dialog
|
|
|
+ // Note that this only will work in the renderer process, it's a noop on the main process
|
|
|
+ if (event.exception && event.event_id) {
|
|
|
+ showReportDialog({ eventId: event_id });
|
|
|
+ }
|
|
|
+ return event;
|
|
|
+ },
|
|
|
+});`,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ configure: () => [
|
|
|
+ {
|
|
|
+ type: StepType.CONFIGURE,
|
|
|
+ description: getCrashReportModalConfigDescription({
|
|
|
+ link: 'https://docs.sentry.io/platforms/javascript/guides/electron/user-feedback/configuration/#crash-report-modal',
|
|
|
+ }),
|
|
|
+ additionalInfo: widgetCallout({
|
|
|
+ link: 'https://docs.sentry.io/platforms/javascript/guides/electron/user-feedback/#user-feedback-widget',
|
|
|
+ }),
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ verify: () => [],
|
|
|
+ nextSteps: () => [],
|
|
|
+};
|
|
|
+
|
|
|
const docs: Docs = {
|
|
|
onboarding,
|
|
|
feedbackOnboardingNpm: feedbackOnboarding,
|
|
|
replayOnboardingNpm: replayOnboarding,
|
|
|
customMetricsOnboarding,
|
|
|
+ crashReportOnboarding,
|
|
|
};
|
|
|
|
|
|
export default docs;
|