Skip to content

Commit b36f693

Browse files
ref(onboarding): Split aiohttp onboarding docs
1 parent 2f27622 commit b36f693

File tree

3 files changed

+40
-42
lines changed

3 files changed

+40
-42
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types';
2+
import {
3+
feedbackOnboardingJsLoader,
4+
replayOnboardingJsLoader,
5+
} from 'sentry/gettingStartedDocs/javascript/jsLoader/jsLoader';
6+
import {agentMonitoring} from 'sentry/gettingStartedDocs/python/python/agentMonitoring';
7+
import {crashReport} from 'sentry/gettingStartedDocs/python/python/crashReport';
8+
import {featureFlag} from 'sentry/gettingStartedDocs/python/python/featureFlag';
9+
import {logs} from 'sentry/gettingStartedDocs/python/python/logs';
10+
import {mcp} from 'sentry/gettingStartedDocs/python/python/mcp';
11+
import {profiling} from 'sentry/gettingStartedDocs/python/python/profiling';
12+
13+
import {onboarding} from './onboarding';
14+
15+
const docs: Docs = {
16+
onboarding,
17+
replayOnboardingJsLoader,
18+
profilingOnboarding: profiling(),
19+
crashReportOnboarding: crashReport,
20+
featureFlagOnboarding: featureFlag,
21+
feedbackOnboardingJsLoader,
22+
agentMonitoringOnboarding: agentMonitoring,
23+
mcpOnboarding: mcp,
24+
logsOnboarding: logs(),
25+
};
26+
27+
export default docs;
28+

static/app/gettingStartedDocs/python/aiohttp.spec.tsx renamed to static/app/gettingStartedDocs/python/aiohttp/onboarding.spec.tsx

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

77
import {ProductSolution} from 'sentry/components/onboarding/gettingStartedDoc/types';
88

9-
import docs from './aiohttp';
9+
import docs from '.';
1010

1111
describe('aiohttp onboarding docs', () => {
1212
it('renders doc correctly', () => {

static/app/gettingStartedDocs/python/aiohttp.tsx renamed to static/app/gettingStartedDocs/python/aiohttp/onboarding.tsx

Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,18 @@
11
import {ExternalLink} from 'sentry/components/core/link';
22
import {
33
StepType,
4-
type Docs,
54
type DocsParams,
65
type OnboardingConfig,
76
} from 'sentry/components/onboarding/gettingStartedDoc/types';
7+
import {verify} from 'sentry/gettingStartedDocs/python/python/logs';
8+
import {alternativeProfiling} from 'sentry/gettingStartedDocs/python/python/profiling';
89
import {
9-
feedbackOnboardingJsLoader,
10-
replayOnboardingJsLoader,
11-
} from 'sentry/gettingStartedDocs/javascript/jsLoader/jsLoader';
12-
import {
13-
agentMonitoringOnboarding,
14-
crashReportOnboardingPython,
15-
featureFlagOnboarding,
16-
mcpOnboarding,
17-
} from 'sentry/gettingStartedDocs/python/python';
18-
import {t, tct} from 'sentry/locale';
19-
import {
20-
alternativeProfilingConfiguration,
2110
getPythonAiocontextvarsCodeBlocks,
2211
getPythonInstallCodeBlock,
23-
getPythonLogsOnboarding,
24-
getPythonProfilingOnboarding,
25-
getVerifyLogsContent,
26-
} from 'sentry/utils/gettingStartedDocs/python';
27-
28-
type Params = DocsParams;
12+
} from 'sentry/gettingStartedDocs/python/python/utils';
13+
import {t, tct} from 'sentry/locale';
2914

30-
const getSdkSetupSnippet = (params: Params) => `
15+
const getSdkSetupSnippet = (params: DocsParams) => `
3116
from aiohttp import web
3217
3318
import sentry_sdk
@@ -71,7 +56,7 @@ sentry_sdk.init(
7156
)
7257
`;
7358

74-
const onboarding: OnboardingConfig = {
59+
export const onboarding: OnboardingConfig = {
7560
introduction: () =>
7661
tct(
7762
'The AIOHTTP integration adds support for the [link:AIOHTTP-Server Web Framework].',
@@ -94,7 +79,7 @@ const onboarding: OnboardingConfig = {
9479
],
9580
},
9681
],
97-
configure: (params: Params) => [
82+
configure: (params: DocsParams) => [
9883
{
9984
type: StepType.CONFIGURE,
10085
content: [
@@ -112,11 +97,11 @@ const onboarding: OnboardingConfig = {
11297
language: 'python',
11398
code: getSdkSetupSnippet(params),
11499
},
115-
alternativeProfilingConfiguration(params),
100+
alternativeProfiling(params),
116101
],
117102
},
118103
],
119-
verify: (params: Params) => [
104+
verify: (params: DocsParams) => [
120105
{
121106
type: StepType.VERIFY,
122107
content: [
@@ -140,7 +125,7 @@ app.add_routes([web.get('/', hello)])
140125
web.run_app(app)
141126
`,
142127
},
143-
getVerifyLogsContent(params),
128+
verify(params),
144129
{
145130
type: 'text',
146131
text: [
@@ -159,7 +144,7 @@ web.run_app(app)
159144
],
160145
},
161146
],
162-
nextSteps: (params: Params) => {
147+
nextSteps: (params: DocsParams) => {
163148
const steps = [] as any[];
164149
if (params.isLogsSelected) {
165150
steps.push({
@@ -175,18 +160,3 @@ web.run_app(app)
175160
},
176161
};
177162

178-
const logsOnboarding = getPythonLogsOnboarding();
179-
180-
const docs: Docs = {
181-
onboarding,
182-
replayOnboardingJsLoader,
183-
profilingOnboarding: getPythonProfilingOnboarding(),
184-
crashReportOnboarding: crashReportOnboardingPython,
185-
featureFlagOnboarding,
186-
feedbackOnboardingJsLoader,
187-
agentMonitoringOnboarding,
188-
mcpOnboarding,
189-
logsOnboarding,
190-
};
191-
192-
export default docs;

0 commit comments

Comments
 (0)