Skip to content
Open
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
1 change: 1 addition & 0 deletions scripts/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ const CONSTANTS: Record<string, string> = {
'IssueTaxonomy.ERRORS_AND_OUTAGES': 'errors-outages',
'IssueTaxonomy.BREACHED_METRICS': 'breached-metrics',
'IssueTaxonomy.WARNINGS': 'warnings',
'IssueTaxonomy.SENTRY_CONFIGURATION': 'sentry-configuration',
};

function resolveTemplate(expr: string): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,18 @@ export function GlobalCommandPaletteActions() {
<CMDKAction display={{label: t('Go to...')}}>
<CMDKAction display={{label: t('Issues'), icon: <IconIssues />}}>
<CMDKAction display={{label: t('Feed')}} to={`${prefix}/issues/`} />
{Object.values(ISSUE_TAXONOMY_CONFIG).map(config => (
<CMDKAction
key={config.key}
display={{label: config.label}}
to={`${prefix}/issues/${config.key}/`}
/>
))}
{Object.values(ISSUE_TAXONOMY_CONFIG)
.filter(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: might be worth extracting this filter to a helper since its used in multiple places

({featureFlag}) =>
!featureFlag || organization.features.includes(featureFlag)
)
.map(config => (
<CMDKAction
key={config.key}
display={{label: config.label}}
to={`${prefix}/issues/${config.key}/`}
/>
))}
<CMDKAction
display={{label: t('User Feedback')}}
to={`${prefix}/issues/feedback/`}
Expand Down
4 changes: 4 additions & 0 deletions static/app/router/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2522,6 +2522,10 @@ function buildRoutes(): RouteObject[] {
path: `${IssueTaxonomy.WARNINGS}/`,
component: make(() => import('sentry/views/issueList/pages/warnings')),
},
{
path: `${IssueTaxonomy.SENTRY_CONFIGURATION}/`,
component: make(() => import('sentry/views/issueList/pages/sentryConfiguration')),
},
{
path: 'instrumentation/',
component: make(() => import('sentry/views/issueList/pages/instrumentation')),
Expand Down
30 changes: 30 additions & 0 deletions static/app/views/issueList/pages/sentryConfiguration.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import Feature from 'sentry/components/acl/feature';
import {NoProjectMessage} from 'sentry/components/noProjectMessage';
import {PageFiltersContainer} from 'sentry/components/pageFilters/container';
import {useOrganization} from 'sentry/utils/useOrganization';
import {IssueListContainer} from 'sentry/views/issueList';
import IssueListOverview from 'sentry/views/issueList/overview';
import {ISSUE_TAXONOMY_CONFIG, IssueTaxonomy} from 'sentry/views/issueList/taxonomies';

const CONFIG = ISSUE_TAXONOMY_CONFIG[IssueTaxonomy.SENTRY_CONFIGURATION];
const QUERY = `is:unresolved issue.category:[${CONFIG.categories.join(',')}]`;

export default function SentryConfigurationPage() {
const organization = useOrganization();

return (
<Feature features={CONFIG.featureFlag ?? []} renderDisabled>
<IssueListContainer title={CONFIG.label}>
<PageFiltersContainer>
<NoProjectMessage organization={organization}>
<IssueListOverview
initialQuery={QUERY}
title={CONFIG.label}
titleDescription={CONFIG.description}
/>
</NoProjectMessage>
</PageFiltersContainer>
</IssueListContainer>
</Feature>
);
}
11 changes: 11 additions & 0 deletions static/app/views/issueList/taxonomies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export enum IssueTaxonomy {
ERRORS_AND_OUTAGES = 'errors-outages',
BREACHED_METRICS = 'breached-metrics',
WARNINGS = 'warnings',
SENTRY_CONFIGURATION = 'sentry-configuration',
}

export const ISSUE_TAXONOMY_CONFIG: Record<
Expand All @@ -16,6 +17,7 @@ export const ISSUE_TAXONOMY_CONFIG: Record<
description: ReactNode;
key: string;
label: string;
featureFlag?: string;
}
> = {
[IssueTaxonomy.ERRORS_AND_OUTAGES]: {
Expand Down Expand Up @@ -47,4 +49,13 @@ export const ISSUE_TAXONOMY_CONFIG: Record<
'Issues in your code or configuration that may not break functionality but can degrade performance or user experience'
),
},
[IssueTaxonomy.SENTRY_CONFIGURATION]: {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like by adding this item to ISSUE_TAXONOMY_CONFIG it gets unconditionally rendered here

{Object.values(ISSUE_TAXONOMY_CONFIG).map(({key, label}) => (
, does it need to be feature flagged?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Laser review man, thanks

Added a feature flag gating to the nav item and the route itself

categories: [IssueCategory.CONFIGURATION],
label: t('Sentry Configuration'),
key: 'sentry-configuration',
description: t(
'Issues detected from SDK or tooling configuration problems that degrade your ability to debug telemetry using Sentry.'
),
featureFlag: 'issue-sourcemap-configuration-visible',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,22 @@ export function IssuesSecondaryNavigation() {
<SecondaryNavigation.Separator />
<SecondaryNavigation.Section id="issues-types">
<SecondaryNavigation.List>
{Object.values(ISSUE_TAXONOMY_CONFIG).map(({key, label}) => (
<SecondaryNavigation.ListItem key={key}>
<SecondaryNavigation.Link
to={`${baseUrl}/${key}/`}
end
analyticsItemName={`issues_types_${key}`}
>
{label}
</SecondaryNavigation.Link>
</SecondaryNavigation.ListItem>
))}
{Object.values(ISSUE_TAXONOMY_CONFIG)
.filter(
({featureFlag}) =>
!featureFlag || organization.features.includes(featureFlag)
)
.map(({key, label}) => (
<SecondaryNavigation.ListItem key={key}>
<SecondaryNavigation.Link
to={`${baseUrl}/${key}/`}
end
analyticsItemName={`issues_types_${key}`}
>
{label}
</SecondaryNavigation.Link>
</SecondaryNavigation.ListItem>
))}
<SecondaryNavigation.ListItem>
<SecondaryNavigation.Link
to={`${baseUrl}/feedback/`}
Expand Down
Loading