Skip to content

Commit d8f31a9

Browse files
k-fishshashjar
authored andcommitted
feat(tracemetrics): Add onboarding skeleton for metrics (#102088)
### Summary This makes use of the hasTraceMetrics flag to properly show onboarding or not, but does not actually include the onboarding steps (which can be added later by us or the sdk maintainers).
1 parent 3ae625a commit d8f31a9

File tree

24 files changed

+554
-18
lines changed

24 files changed

+554
-18
lines changed

static/app/components/events/featureFlags/onboarding/featureFlagOnboardingLayout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export function FeatureFlagOnboardingLayout({
4747
platformKey,
4848
project,
4949
isLogsSelected: false,
50+
isMetricsSelected: false,
5051
isFeedbackSelected: false,
5152
isPerformanceSelected: false,
5253
isProfilingSelected: false,

static/app/components/feedback/feedbackOnboarding/feedbackOnboardingLayout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export function FeedbackOnboardingLayout({
4747
project,
4848
isLogsSelected: false,
4949
isFeedbackSelected: true,
50+
isMetricsSelected: false,
5051
isPerformanceSelected: false,
5152
isProfilingSelected: false,
5253
isReplaySelected: false,

static/app/components/onboarding/gettingStartedDoc/onboardingLayout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export function OnboardingLayout({
8686
project,
8787
isLogsSelected: activeProductSelection.includes(ProductSolution.LOGS),
8888
isFeedbackSelected: false,
89+
isMetricsSelected: activeProductSelection.includes(ProductSolution.METRICS),
8990
isPerformanceSelected: activeProductSelection.includes(
9091
ProductSolution.PERFORMANCE_MONITORING
9192
),

static/app/components/onboarding/gettingStartedDoc/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export enum ProductSolution {
8787
SESSION_REPLAY = 'session-replay',
8888
PROFILING = 'profiling',
8989
LOGS = 'logs',
90+
METRICS = 'metrics',
9091
}
9192

9293
export interface DocsParams<
@@ -96,6 +97,7 @@ export interface DocsParams<
9697
dsn: ProjectKey['dsn'];
9798
isFeedbackSelected: boolean;
9899
isLogsSelected: boolean;
100+
isMetricsSelected: boolean;
99101
isPerformanceSelected: boolean;
100102
isProfilingSelected: boolean;
101103
isReplaySelected: boolean;
@@ -167,6 +169,7 @@ export interface Docs<PlatformOptions extends BasePlatformOptions = BasePlatform
167169
feedbackOnboardingNpm?: OnboardingConfig<PlatformOptions>;
168170
logsOnboarding?: OnboardingConfig<PlatformOptions>;
169171
mcpOnboarding?: OnboardingConfig<PlatformOptions>;
172+
metricsOnboarding?: OnboardingConfig<PlatformOptions>;
170173
performanceOnboarding?: OnboardingConfig<PlatformOptions>;
171174
platformOptions?: PlatformOptions;
172175
profilingOnboarding?: OnboardingConfig<PlatformOptions>;

static/app/components/onboarding/gettingStartedDoc/utils/useLoadGettingStarted.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
feedbackOnboardingPlatforms,
88
replayPlatforms,
99
withLoggingOnboarding,
10+
withMetricsOnboarding,
1011
withPerformanceOnboarding,
1112
} from 'sentry/data/platformCategories';
1213
import type {Organization} from 'sentry/types/organization';
@@ -17,7 +18,13 @@ import {useProjectKeys} from 'sentry/utils/useProjectKeys';
1718
type Props = {
1819
orgSlug: Organization['slug'];
1920
platform: PlatformIntegration;
20-
productType?: 'feedback' | 'replay' | 'performance' | 'featureFlags' | 'logs';
21+
productType?:
22+
| 'feedback'
23+
| 'replay'
24+
| 'performance'
25+
| 'featureFlags'
26+
| 'logs'
27+
| 'metrics';
2128
projSlug?: Project['slug'];
2229
};
2330

@@ -54,7 +61,8 @@ export function useLoadGettingStarted({
5461
(productType === 'feedback' &&
5562
!feedbackOnboardingPlatforms.includes(platform.id)) ||
5663
(productType === 'featureFlags' &&
57-
!featureFlagOnboardingPlatforms.includes(platform.id))
64+
!featureFlagOnboardingPlatforms.includes(platform.id)) ||
65+
(productType === 'metrics' && !withMetricsOnboarding.has(platform.id))
5866
) {
5967
setModule('none');
6068
return;

static/app/components/performanceOnboarding/sidebar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ function OnboardingContent({currentProject}: {currentProject: Project}) {
310310
project: currentProject,
311311
isFeedbackSelected: false,
312312
isLogsSelected: false,
313+
isMetricsSelected: false,
313314
isPerformanceSelected: true,
314315
isProfilingSelected: false,
315316
isReplaySelected: false,

static/app/components/profiling/profilingOnboardingSidebar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ function ProfilingOnboardingContent(props: ProfilingOnboardingContentProps) {
327327
project: props.project,
328328
isLogsSelected: false,
329329
isFeedbackSelected: false,
330+
isMetricsSelected: false,
330331
isPerformanceSelected: true,
331332
isProfilingSelected: true,
332333
isReplaySelected: false,

static/app/components/replaysOnboarding/replayOnboardingLayout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export function ReplayOnboardingLayout({
4747
project,
4848
isLogsSelected: false,
4949
isFeedbackSelected: false,
50+
isMetricsSelected: false,
5051
isPerformanceSelected: false,
5152
isProfilingSelected: false,
5253
isReplaySelected: true,

static/app/components/updatedEmptyState.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export default function UpdatedEmptyState({project}: {project?: Project}) {
9292
platformKey: currentPlatformKey,
9393
project,
9494
isLogsSelected: false,
95+
isMetricsSelected: false,
9596
isFeedbackSelected: false,
9697
isPerformanceSelected: false,
9798
isProfilingSelected: false,

static/app/data/platformCategories.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,12 @@ export const withoutLoggingSupport: Set<PlatformKey> = new Set([
390390
'native',
391391
]);
392392

393+
// List of platforms that have metrics onboarding checklist content
394+
export const withMetricsOnboarding: Set<PlatformKey> = new Set([]);
395+
396+
// List of platforms that do not have metrics support. We make use of this list in the product to not provide any Metrics
397+
export const withoutMetricsSupport: Set<PlatformKey> = new Set([]);
398+
393399
export const profiling: PlatformKey[] = [
394400
'android',
395401
'apple',

0 commit comments

Comments
 (0)