Skip to content

Commit ac55649

Browse files
priscilawebdevandrewshie-sentry
authored andcommitted
ref(onboarding): Split aws lambda onboarding docs (#102945)
Contributes to https://linear.app/getsentry/issue/TET-864/introduce-folders-for-onboarding-platforms
1 parent afad899 commit ac55649

File tree

4 files changed

+48
-42
lines changed

4 files changed

+48
-42
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import type {
2+
DocsParams,
3+
OnboardingConfig,
4+
} from 'sentry/components/onboarding/gettingStartedDoc/types';
5+
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types';
6+
import {
7+
getCrashReportGenericInstallSteps,
8+
getCrashReportModalConfigDescription,
9+
getCrashReportModalIntroduction,
10+
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
11+
12+
export const crashReport: OnboardingConfig = {
13+
introduction: () => getCrashReportModalIntroduction(),
14+
install: (params: DocsParams) => getCrashReportGenericInstallSteps(params),
15+
configure: () => [
16+
{
17+
type: StepType.CONFIGURE,
18+
content: [
19+
{
20+
type: 'text',
21+
text: getCrashReportModalConfigDescription({
22+
link: 'https://docs.sentry.io/platforms/dotnet/guides/aws-lambda/user-feedback/configuration/#crash-report-modal',
23+
}),
24+
},
25+
],
26+
},
27+
],
28+
verify: () => [],
29+
nextSteps: () => [],
30+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types';
2+
import {feedback} from 'sentry/gettingStartedDocs/dotnet/dotnet/feedback';
3+
4+
import {crashReport} from './crashReport';
5+
import {onboarding} from './onboarding';
6+
7+
const docs: Docs = {
8+
onboarding,
9+
feedbackOnboardingCrashApi: feedback,
10+
crashReportOnboarding: crashReport,
11+
};
12+
13+
export default docs;

static/app/gettingStartedDocs/dotnet/awslambda.spec.tsx renamed to static/app/gettingStartedDocs/dotnet/awslambda/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 './awslambda';
7+
import docs from './index';
88

99
describe('awslambda onboarding docs', () => {
1010
it('renders errors onboarding docs correctly', async () => {

static/app/gettingStartedDocs/dotnet/awslambda.tsx renamed to static/app/gettingStartedDocs/dotnet/awslambda/onboarding.tsx

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,27 @@
11
import {ExternalLink} from 'sentry/components/core/link';
22
import type {
3-
Docs,
43
DocsParams,
54
OnboardingConfig,
65
} from 'sentry/components/onboarding/gettingStartedDoc/types';
76
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types';
8-
import {
9-
getCrashReportGenericInstallSteps,
10-
getCrashReportModalConfigDescription,
11-
getCrashReportModalIntroduction,
12-
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
13-
import {feedback} from 'sentry/gettingStartedDocs/dotnet/dotnet/feedback';
147
import {t, tct} from 'sentry/locale';
158
import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion';
169

17-
type Params = DocsParams;
18-
19-
const getInstallSnippetPackageManager = (params: Params) => `
10+
const getInstallSnippetPackageManager = (params: DocsParams) => `
2011
Install-Package Sentry.AspNetCore -Version ${getPackageVersion(
2112
params,
2213
'sentry.dotnet.aspnetcore',
2314
'3.34.0'
2415
)}`;
2516

26-
const getInstallSnippetCoreCli = (params: Params) => `
17+
const getInstallSnippetCoreCli = (params: DocsParams) => `
2718
dotnet add package Sentry.AspNetCore -v ${getPackageVersion(
2819
params,
2920
'sentry.dotnet.aspnetcore',
3021
'3.34.0'
3122
)}`;
3223

33-
const getConfigureSnippet = (params: Params) => `
24+
const getConfigureSnippet = (params: DocsParams) => `
3425
public class LambdaEntryPoint : Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction
3526
{
3627
protected override void Init(IWebHostBuilder builder)
@@ -64,7 +55,7 @@ public class BadController
6455
public string Get() => throw null;
6556
}`;
6657

67-
const onboarding: OnboardingConfig = {
58+
export const onboarding: OnboardingConfig = {
6859
introduction: () =>
6960
tct(
7061
'Sentry provides an integration with AWS Lambda ASP.NET Core Server through the Sentry.AspNetCore NuGet package.',
@@ -172,31 +163,3 @@ const onboarding: OnboardingConfig = {
172163
},
173164
],
174165
};
175-
176-
const crashReportOnboarding: OnboardingConfig = {
177-
introduction: () => getCrashReportModalIntroduction(),
178-
install: (params: Params) => getCrashReportGenericInstallSteps(params),
179-
configure: () => [
180-
{
181-
type: StepType.CONFIGURE,
182-
content: [
183-
{
184-
type: 'text',
185-
text: getCrashReportModalConfigDescription({
186-
link: 'https://docs.sentry.io/platforms/dotnet/guides/aws-lambda/user-feedback/configuration/#crash-report-modal',
187-
}),
188-
},
189-
],
190-
},
191-
],
192-
verify: () => [],
193-
nextSteps: () => [],
194-
};
195-
196-
const docs: Docs = {
197-
onboarding,
198-
feedbackOnboardingCrashApi: feedback,
199-
crashReportOnboarding,
200-
};
201-
202-
export default docs;

0 commit comments

Comments
 (0)