Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(feedback): [3/4] add python + rust platforms to issues feedback onboarding #66605

Merged
merged 7 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const getCrashReportModalConfigDescription = ({link}: {link: string}) =>
{code: <code />, link: <ExternalLink href={link} />}
);

export const getCrashReportModalSnippetJavaScript = params => [
const getCrashReportModalSnippetJavaScript = params => [
{
code: [
{
Expand Down Expand Up @@ -167,6 +167,20 @@ export function getCrashReportSDKInstallFirstStep(params) {
};
}

const getGenericScript = params => [
{
label: 'HTML',
value: 'html',
language: 'html',
code: `<script>
Sentry.init({ dsn: "${params.dsn}" });
Sentry.showReportDialog({
eventId: "{{ event_id }}",
});
</script>`,
},
];

export const getCrashReportGenericInstallStep = params => [
{
type: StepType.INSTALL,
Expand All @@ -182,19 +196,28 @@ export const getCrashReportGenericInstallStep = params => [
codeLast: <code />,
}
),
code: [
code: getGenericScript(params),
},
],
},
];

export const getCrashReportBackendInstallStep = params => [
{
type: StepType.INSTALL,
configurations: [
getCrashReportSDKInstallFirstStep(params),
{
description: tct(
'You will then need to call [codeShow:showReportDialog] and pass in the generated event ID. This event ID is returned from all calls to [codeEvent:capture_event] and [codeException:capture_exception]. There is also a function called [codeLast:last_event_id] that returns the ID of the most recently sent event.',
{
label: 'HTML',
value: 'html',
language: 'html',
code: `<script>
Sentry.init({ dsn: "${params.dsn}" });
Sentry.showReportDialog({
eventId: "{{ event_id }}",
});
</script>`,
},
],
codeShow: <code />,
codeEvent: <code />,
codeException: <code />,
codeLast: <code />,
}
),
code: getGenericScript(params),
},
],
},
Expand Down
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/aiohttp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import replayOnboardingJsLoader from 'sentry/gettingStartedDocs/javascript/jsLoader/jsLoader';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -147,6 +148,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/asgi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type {
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -139,6 +140,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/awslambda.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type {
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';
import {space} from 'sentry/styles/space';

Expand Down Expand Up @@ -141,6 +142,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
Expand Down
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/bottle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import replayOnboardingJsLoader from 'sentry/gettingStartedDocs/javascript/jsLoader/jsLoader';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -131,6 +132,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/celery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type {
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';
import {space} from 'sentry/styles/space';

Expand Down Expand Up @@ -185,6 +186,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
Expand Down
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/chalice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type {
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -107,6 +108,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/django.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import replayOnboardingJsLoader from 'sentry/gettingStartedDocs/javascript/jsLoader/jsLoader';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -140,6 +141,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/falcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import replayOnboardingJsLoader from 'sentry/gettingStartedDocs/javascript/jsLoader/jsLoader';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -134,6 +135,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/fastapi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import replayOnboardingJsLoader from 'sentry/gettingStartedDocs/javascript/jsLoader/jsLoader';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -135,6 +136,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/flask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import replayOnboardingJsLoader from 'sentry/gettingStartedDocs/javascript/jsLoader/jsLoader';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -134,6 +135,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/gcpfunctions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type {
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';
import {space} from 'sentry/styles/space';

Expand Down Expand Up @@ -134,6 +135,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
Expand Down
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/mongo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type {
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -81,6 +82,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/pylons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type {
DocsParams,
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -112,6 +113,7 @@ const onboarding: OnboardingConfig = {

const docs: Docs = {
onboarding,
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/pyramid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import replayOnboardingJsLoader from 'sentry/gettingStartedDocs/javascript/jsLoader/jsLoader';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -104,6 +105,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
21 changes: 21 additions & 0 deletions static/app/gettingStartedDocs/python/python.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import type {
DocsParams,
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {
getCrashReportBackendInstallStep,
getCrashReportModalConfigDescription,
getCrashReportModalIntroduction,
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import {t, tct} from 'sentry/locale';

Expand Down Expand Up @@ -81,11 +86,27 @@ const onboarding: OnboardingConfig = {
],
};

export const crashReportOnboardingPython: OnboardingConfig = {
introduction: () => getCrashReportModalIntroduction(),
install: (params: Params) => getCrashReportBackendInstallStep(params),
michellewzhang marked this conversation as resolved.
Show resolved Hide resolved
configure: () => [
{
type: StepType.CONFIGURE,
description: getCrashReportModalConfigDescription({
link: 'https://docs.sentry.io/platforms/python/user-feedback/configuration/#crash-report-modal',
}),
},
],
verify: () => [],
nextSteps: () => [],
};

const docs: Docs = {
onboarding,
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/quart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import replayOnboardingJsLoader from 'sentry/gettingStartedDocs/javascript/jsLoader/jsLoader';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -131,6 +132,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/rq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type {
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -195,6 +196,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/sanic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type {
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import replayOnboardingJsLoader from 'sentry/gettingStartedDocs/javascript/jsLoader/jsLoader';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -115,6 +116,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
2 changes: 2 additions & 0 deletions static/app/gettingStartedDocs/python/serverless.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type {
OnboardingConfig,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {getPythonMetricsOnboarding} from 'sentry/components/onboarding/gettingStartedDoc/utils/metricsOnboarding';
import {crashReportOnboardingPython} from 'sentry/gettingStartedDocs/python/python';
import {t, tct} from 'sentry/locale';

type Params = DocsParams;
Expand Down Expand Up @@ -124,6 +125,7 @@ const docs: Docs = {
customMetricsOnboarding: getPythonMetricsOnboarding({
installSnippet: getInstallSnippet(),
}),
crashReportOnboarding: crashReportOnboardingPython,
};

export default docs;
Loading
Loading