Skip to content

Commit 9f3056c

Browse files
alexander-alderman-webbFlash0vergetsantry[bot]
authored
feat(onboarding): Add metrics for .NET platforms (#106551)
Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com> Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
1 parent 305676c commit 9f3056c

29 files changed

Lines changed: 279 additions & 90 deletions

static/app/components/onboarding/productSelection.tsx

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,43 @@ export const platformProductAvailability = {
9797
ProductSolution.PERFORMANCE_MONITORING,
9898
ProductSolution.PROFILING,
9999
ProductSolution.LOGS,
100+
ProductSolution.METRICS,
101+
],
102+
'dotnet-aspnet': [
103+
ProductSolution.PERFORMANCE_MONITORING,
104+
ProductSolution.LOGS,
105+
ProductSolution.METRICS,
106+
],
107+
'dotnet-aspnetcore': [
108+
ProductSolution.PERFORMANCE_MONITORING,
109+
ProductSolution.LOGS,
110+
ProductSolution.METRICS,
111+
],
112+
'dotnet-awslambda': [
113+
ProductSolution.PERFORMANCE_MONITORING,
114+
ProductSolution.LOGS,
115+
ProductSolution.METRICS,
116+
],
117+
'dotnet-gcpfunctions': [
118+
ProductSolution.PERFORMANCE_MONITORING,
119+
ProductSolution.LOGS,
120+
ProductSolution.METRICS,
121+
],
122+
'dotnet-maui': [
123+
ProductSolution.PERFORMANCE_MONITORING,
124+
ProductSolution.LOGS,
125+
ProductSolution.METRICS,
126+
],
127+
'dotnet-winforms': [
128+
ProductSolution.PERFORMANCE_MONITORING,
129+
ProductSolution.LOGS,
130+
ProductSolution.METRICS,
131+
],
132+
'dotnet-wpf': [
133+
ProductSolution.PERFORMANCE_MONITORING,
134+
ProductSolution.LOGS,
135+
ProductSolution.METRICS,
100136
],
101-
'dotnet-aspnet': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS],
102-
'dotnet-aspnetcore': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS],
103-
'dotnet-awslambda': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS],
104-
'dotnet-gcpfunctions': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS],
105-
'dotnet-maui': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS],
106-
'dotnet-winforms': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS],
107-
'dotnet-wpf': [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS],
108137
'dotnet-xamarin': [ProductSolution.PERFORMANCE_MONITORING],
109138
dart: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS],
110139
kotlin: [ProductSolution.PERFORMANCE_MONITORING],

static/app/data/platformCategories.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,14 @@ export const withMetricsOnboarding: Set<PlatformKey> = new Set([
407407
'apple',
408408
'apple-ios',
409409
'apple-macos',
410+
'dotnet',
411+
'dotnet-aspnet',
412+
'dotnet-aspnetcore',
413+
'dotnet-awslambda',
414+
'dotnet-gcpfunctions',
415+
'dotnet-maui',
416+
'dotnet-winforms',
417+
'dotnet-wpf',
410418
'react-native',
411419
'go',
412420
'go-echo',
@@ -480,13 +488,14 @@ export const withMetricsOnboarding: Set<PlatformKey> = new Set([
480488
]);
481489

482490
// List of platforms that do not have metrics support. We make use of this list in the product to not provide any Metrics
483-
export const withoutMetricsSupport: Set<PlatformKey> = new Set([]);
491+
export const withoutMetricsSupport: Set<PlatformKey> = new Set(['dotnet-xamarin']);
484492

485493
export const limitedMetricsSupportPrefixes: Set<string> = new Set([
486494
'android',
487495
'apple',
488496
'bun',
489497
'dart',
498+
'dotnet',
490499
'electron',
491500
'go',
492501
'java',

static/app/gettingStartedDocs/dotnet-aspnet/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types';
22
import {logs} from 'sentry/gettingStartedDocs/dotnet/logs';
3+
import {metrics} from 'sentry/gettingStartedDocs/dotnet/metrics';
34
import {
45
feedbackOnboardingJsLoader,
56
replayOnboardingJsLoader,
@@ -14,6 +15,7 @@ const docs: Docs = {
1415
crashReportOnboarding: crashReport,
1516
feedbackOnboardingJsLoader,
1617
logsOnboarding: logs,
18+
metricsOnboarding: metrics,
1719
};
1820

1921
export default docs;

static/app/gettingStartedDocs/dotnet-aspnet/onboarding.spec.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ describe('aspnet onboarding docs', () => {
1414
version: '1.99.9',
1515
},
1616
},
17-
selectedProducts: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS],
17+
selectedProducts: [
18+
ProductSolution.PERFORMANCE_MONITORING,
19+
ProductSolution.LOGS,
20+
ProductSolution.METRICS,
21+
],
1822
});
1923

2024
// Renders main headings
2125
expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
2226
expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
2327
expect(screen.getByRole('heading', {name: 'Documentation'})).toBeInTheDocument();
24-
expect(screen.getByRole('heading', {name: 'Verify Logs'})).toBeInTheDocument();
2528
expect(screen.getByRole('heading', {name: 'Samples'})).toBeInTheDocument();
2629

2730
// Renders SDK version from registry

static/app/gettingStartedDocs/dotnet-aspnet/onboarding.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type {
66
} from 'sentry/components/onboarding/gettingStartedDoc/types';
77
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types';
88
import {logsVerify} from 'sentry/gettingStartedDocs/dotnet/logs';
9+
import {metricsVerify} from 'sentry/gettingStartedDocs/dotnet/metrics';
910
import {t, tct} from 'sentry/locale';
1011
import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion';
1112

@@ -159,16 +160,10 @@ export const onboarding: OnboardingConfig = {
159160
}
160161
),
161162
},
163+
logsVerify(params),
164+
metricsVerify(params),
162165
],
163166
},
164-
...(params.isLogsSelected
165-
? [
166-
{
167-
title: t('Verify Logs'),
168-
content: [logsVerify(params)],
169-
},
170-
]
171-
: []),
172167
{
173168
title: t('Samples'),
174169
content: [

static/app/gettingStartedDocs/dotnet-aspnetcore/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types';
22
import {logs} from 'sentry/gettingStartedDocs/dotnet/logs';
3+
import {metrics} from 'sentry/gettingStartedDocs/dotnet/metrics';
34
import {
45
feedbackOnboardingJsLoader,
56
replayOnboardingJsLoader,
@@ -14,6 +15,7 @@ const docs: Docs = {
1415
crashReportOnboarding: crashReport,
1516
feedbackOnboardingJsLoader,
1617
logsOnboarding: logs,
18+
metricsOnboarding: metrics,
1719
};
1820

1921
export default docs;

static/app/gettingStartedDocs/dotnet-aspnetcore/onboarding.spec.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@ describe('aspnetcore onboarding docs', () => {
1414
version: '1.99.9',
1515
},
1616
},
17-
selectedProducts: [ProductSolution.PERFORMANCE_MONITORING, ProductSolution.LOGS],
17+
selectedProducts: [
18+
ProductSolution.PERFORMANCE_MONITORING,
19+
ProductSolution.LOGS,
20+
ProductSolution.METRICS,
21+
],
1822
});
1923

2024
// Renders main headings
2125
expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
2226
expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
2327
expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument();
2428
expect(screen.getByRole('heading', {name: 'Tracing'})).toBeInTheDocument();
25-
expect(screen.getByRole('heading', {name: 'Verify Logs'})).toBeInTheDocument();
2629
expect(screen.getByRole('heading', {name: 'Samples'})).toBeInTheDocument();
2730

2831
// Renders SDK version from registry

static/app/gettingStartedDocs/dotnet-aspnetcore/onboarding.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type {
77
} from 'sentry/components/onboarding/gettingStartedDoc/types';
88
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types';
99
import {logsVerify} from 'sentry/gettingStartedDocs/dotnet/logs';
10+
import {metricsVerify} from 'sentry/gettingStartedDocs/dotnet/metrics';
1011
import {t, tct} from 'sentry/locale';
1112
import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion';
1213

@@ -154,6 +155,8 @@ export const onboarding: OnboardingConfig = {
154155
}
155156
),
156157
},
158+
logsVerify(params),
159+
metricsVerify(params),
157160
],
158161
},
159162
...(params.isPerformanceSelected
@@ -185,14 +188,6 @@ export const onboarding: OnboardingConfig = {
185188
},
186189
] satisfies OnboardingStep[])
187190
: []),
188-
...(params.isLogsSelected
189-
? [
190-
{
191-
title: t('Verify Logs'),
192-
content: [logsVerify(params)],
193-
},
194-
]
195-
: []),
196191
{
197192
title: t('Samples'),
198193
content: [

static/app/gettingStartedDocs/dotnet-awslambda/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types';
22
import {feedback} from 'sentry/gettingStartedDocs/dotnet/feedback';
33
import {logs} from 'sentry/gettingStartedDocs/dotnet/logs';
4+
import {metrics} from 'sentry/gettingStartedDocs/dotnet/metrics';
45

56
import {crashReport} from './crashReport';
67
import {onboarding} from './onboarding';
@@ -10,6 +11,7 @@ const docs: Docs = {
1011
feedbackOnboardingCrashApi: feedback,
1112
crashReportOnboarding: crashReport,
1213
logsOnboarding: logs,
14+
metricsOnboarding: metrics,
1315
};
1416

1517
export default docs;

static/app/gettingStartedDocs/dotnet-awslambda/onboarding.spec.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ describe('awslambda onboarding docs', () => {
1414
version: '1.99.9',
1515
},
1616
},
17-
selectedProducts: [ProductSolution.LOGS],
17+
selectedProducts: [ProductSolution.LOGS, ProductSolution.METRICS],
1818
});
1919

2020
// Renders main headings
2121
expect(screen.getByRole('heading', {name: 'Install'})).toBeInTheDocument();
2222
expect(screen.getByRole('heading', {name: 'Configure SDK'})).toBeInTheDocument();
2323
expect(screen.getByRole('heading', {name: 'Verify'})).toBeInTheDocument();
24-
expect(screen.getByRole('heading', {name: 'Verify Logs'})).toBeInTheDocument();
2524

2625
// Renders SDK version from registry
2726
expect(

0 commit comments

Comments
 (0)