Skip to content

Commit c608bd0

Browse files
authored
feat(issue-taxonomy): Add new issue categories to frontend (#89992)
Adds the new issue categories to the frontend types. This also adds issue type config files for each one. So far this does not have any effects on behavior, but it will mean that the issue types will continue to work when the backend starts returning different values for `issueCategory`.
1 parent 197e20d commit c608bd0

9 files changed

+710
-17
lines changed

static/app/types/group.tsx

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,42 @@ export enum SavedSearchType {
6363
}
6464

6565
export enum IssueCategory {
66-
PERFORMANCE = 'performance',
6766
ERROR = 'error',
67+
FEEDBACK = 'feedback',
68+
69+
/**
70+
* @deprecated
71+
* Regression issues will move to the "performance_regression" category
72+
* Other issues will move to the "performance_best_practice" category
73+
*/
74+
PERFORMANCE = 'performance',
75+
/**
76+
* @deprecated
77+
* Cron issues will move to the "outage" category
78+
*/
6879
CRON = 'cron',
80+
/**
81+
* @deprecated
82+
* Rage/dead click issues will move to the "user_experience" category
83+
*/
6984
REPLAY = 'replay',
85+
/**
86+
* @deprecated
87+
* Uptime issues will move to the "outage" category
88+
*/
7089
UPTIME = 'uptime',
90+
/**
91+
* @deprecated
92+
* Metric alert issues will move to the "performance_regression" category
93+
*/
7194
METRIC_ALERT = 'metric_alert',
95+
96+
// New issue categories (under the issue-taxonomy flag)
97+
OUTAGE = 'outage',
98+
PERFORMANCE_REGRESSION = 'performance_regression',
99+
USER_EXPERIENCE = 'user_experience',
100+
RESPONSIVENESS = 'responsiveness',
101+
PERFORMANCE_BEST_PRACTICE = 'performance_best_practice',
72102
}
73103

74104
export enum IssueType {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import {t} from 'sentry/locale';
2+
import type {IssueCategoryConfigMapping} from 'sentry/utils/issueTypeConfig/types';
3+
4+
const feedbackConfig: IssueCategoryConfigMapping = {
5+
_categoryDefaults: {
6+
usesIssuePlatform: true,
7+
evidence: {title: t('Feedback')},
8+
issueSummary: {enabled: false},
9+
},
10+
};
11+
12+
export default feedbackConfig;

static/app/utils/issueTypeConfig/index.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,20 @@ import {
66
errorConfig,
77
getErrorHelpResource,
88
} from 'sentry/utils/issueTypeConfig/errorConfig';
9+
import feedbackConfig from 'sentry/utils/issueTypeConfig/feedbackConfig';
910
import metricIssueConfig from 'sentry/utils/issueTypeConfig/metricIssueConfig';
11+
import outageConfig from 'sentry/utils/issueTypeConfig/outageConfig';
12+
import performanceBestPracticeConfig from 'sentry/utils/issueTypeConfig/performanceBestPracticeConfig';
1013
import performanceConfig from 'sentry/utils/issueTypeConfig/performanceConfig';
14+
import performanceRegressionConfig from 'sentry/utils/issueTypeConfig/performanceRegressionConfig';
1115
import replayConfig from 'sentry/utils/issueTypeConfig/replayConfig';
16+
import responsivenessConfig from 'sentry/utils/issueTypeConfig/responsivenessConfig';
1217
import type {
1318
IssueCategoryConfigMapping,
1419
IssueTypeConfig,
1520
} from 'sentry/utils/issueTypeConfig/types';
1621
import uptimeConfig from 'sentry/utils/issueTypeConfig/uptimeConfig';
22+
import userExperienceConfig from 'sentry/utils/issueTypeConfig/userExperienceConfig';
1723
import {Tab} from 'sentry/views/issueDetails/types';
1824

1925
type Config = Record<IssueCategory, IssueCategoryConfigMapping>;
@@ -88,6 +94,12 @@ const issueTypeConfig: Config = {
8894
[IssueCategory.REPLAY]: replayConfig,
8995
[IssueCategory.UPTIME]: uptimeConfig,
9096
[IssueCategory.METRIC_ALERT]: metricIssueConfig,
97+
[IssueCategory.OUTAGE]: outageConfig,
98+
[IssueCategory.PERFORMANCE_BEST_PRACTICE]: performanceBestPracticeConfig,
99+
[IssueCategory.PERFORMANCE_REGRESSION]: performanceRegressionConfig,
100+
[IssueCategory.RESPONSIVENESS]: responsivenessConfig,
101+
[IssueCategory.USER_EXPERIENCE]: userExperienceConfig,
102+
[IssueCategory.FEEDBACK]: feedbackConfig,
91103
};
92104

93105
/**
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import {t} from 'sentry/locale';
2+
import {IssueType} from 'sentry/types/group';
3+
import type {IssueCategoryConfigMapping} from 'sentry/utils/issueTypeConfig/types';
4+
import {Tab} from 'sentry/views/issueDetails/types';
5+
6+
const outageConfig: IssueCategoryConfigMapping = {
7+
_categoryDefaults: {
8+
usesIssuePlatform: true,
9+
autofix: false,
10+
mergedIssues: {enabled: false},
11+
similarIssues: {enabled: false},
12+
issueSummary: {enabled: false},
13+
},
14+
[IssueType.MONITOR_CHECK_IN_FAILURE]: {
15+
actions: {
16+
archiveUntilOccurrence: {enabled: true},
17+
delete: {
18+
enabled: false,
19+
disabledReason: t('Not yet supported for cron issues'),
20+
},
21+
deleteAndDiscard: {
22+
enabled: false,
23+
disabledReason: t('Not yet supported for cron issues'),
24+
},
25+
merge: {
26+
enabled: false,
27+
disabledReason: t('Not yet supported for cron issues'),
28+
},
29+
ignore: {enabled: true},
30+
resolve: {enabled: false},
31+
resolveInRelease: {enabled: false},
32+
share: {enabled: true},
33+
},
34+
header: {
35+
filterBar: {enabled: true},
36+
graph: {enabled: true, type: 'cron-checks'},
37+
tagDistribution: {enabled: false},
38+
occurrenceSummary: {enabled: true},
39+
},
40+
detector: {
41+
enabled: true,
42+
title: t('Cron Monitor'),
43+
ctaText: t('View monitor details'),
44+
},
45+
pages: {
46+
landingPage: Tab.DETAILS,
47+
events: {enabled: true},
48+
openPeriods: {enabled: false},
49+
uptimeChecks: {enabled: false},
50+
checkIns: {enabled: true},
51+
attachments: {enabled: false},
52+
userFeedback: {enabled: false},
53+
replays: {enabled: false},
54+
tagsTab: {enabled: true},
55+
},
56+
},
57+
[IssueType.UPTIME_DOMAIN_FAILURE]: {
58+
actions: {
59+
archiveUntilOccurrence: {enabled: true},
60+
delete: {enabled: false},
61+
deleteAndDiscard: {enabled: false},
62+
merge: {enabled: false},
63+
ignore: {enabled: true},
64+
resolve: {enabled: false},
65+
resolveInRelease: {enabled: false},
66+
share: {enabled: true},
67+
},
68+
header: {
69+
filterBar: {enabled: true, fixedEnvironment: true},
70+
graph: {enabled: true, type: 'uptime-checks'},
71+
tagDistribution: {enabled: false},
72+
occurrenceSummary: {enabled: true, downtime: true},
73+
},
74+
detector: {
75+
enabled: true,
76+
title: t('Uptime Monitor'),
77+
ctaText: t('View alert details'),
78+
},
79+
customCopy: {
80+
eventUnits: t('Events'),
81+
resolution: t('Resolved'),
82+
},
83+
pages: {
84+
landingPage: Tab.EVENTS,
85+
events: {enabled: true},
86+
openPeriods: {enabled: false},
87+
checkIns: {enabled: false},
88+
uptimeChecks: {enabled: true},
89+
attachments: {enabled: false},
90+
userFeedback: {enabled: false},
91+
replays: {enabled: false},
92+
tagsTab: {enabled: false},
93+
},
94+
resources: null,
95+
stats: {enabled: false},
96+
},
97+
};
98+
99+
export default outageConfig;
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
import {t} from 'sentry/locale';
2+
import {IssueType} from 'sentry/types/group';
3+
import type {IssueCategoryConfigMapping} from 'sentry/utils/issueTypeConfig/types';
4+
import {Tab} from 'sentry/views/issueDetails/types';
5+
6+
const performanceBestPracticeConfig: IssueCategoryConfigMapping = {
7+
_categoryDefaults: {
8+
actions: {
9+
archiveUntilOccurrence: {enabled: true},
10+
delete: {
11+
enabled: false,
12+
disabledReason: t('Not yet supported for performance issues'),
13+
},
14+
deleteAndDiscard: {
15+
enabled: false,
16+
disabledReason: t('Not yet supported for performance issues'),
17+
},
18+
merge: {
19+
enabled: false,
20+
disabledReason: t('Not yet supported for performance issues'),
21+
},
22+
ignore: {enabled: true},
23+
resolve: {enabled: true},
24+
resolveInRelease: {enabled: true},
25+
share: {enabled: true},
26+
},
27+
pages: {
28+
landingPage: Tab.DETAILS,
29+
events: {enabled: true},
30+
openPeriods: {enabled: false},
31+
checkIns: {enabled: false},
32+
uptimeChecks: {enabled: false},
33+
attachments: {enabled: false},
34+
userFeedback: {enabled: false},
35+
replays: {enabled: true},
36+
tagsTab: {enabled: true},
37+
},
38+
autofix: false,
39+
mergedIssues: {enabled: false},
40+
similarIssues: {enabled: false},
41+
stacktrace: {enabled: false},
42+
spanEvidence: {enabled: true},
43+
// Performance issues render a custom SpanEvidence component
44+
evidence: null,
45+
usesIssuePlatform: true,
46+
issueSummary: {enabled: false},
47+
},
48+
[IssueType.PERFORMANCE_CONSECUTIVE_DB_QUERIES]: {
49+
resources: {
50+
description: t(
51+
'Consecutive DB Queries are a sequence of database spans where one or more have been identified as parallelizable, or in other words, spans that may be shifted to the start of the sequence. This often occurs when a db query performs no filtering on the data, for example a query without a WHERE clause. To learn more about how to fix consecutive DB queries, check out these resources:'
52+
),
53+
links: [
54+
{
55+
text: t('Sentry Docs: Consecutive DB Queries'),
56+
link: 'https://docs.sentry.io/product/issues/issue-details/performance-issues/consecutive-db-queries/',
57+
},
58+
],
59+
linksByPlatform: {},
60+
},
61+
},
62+
[IssueType.PERFORMANCE_CONSECUTIVE_HTTP]: {
63+
resources: {
64+
description: t(
65+
'A Consecutive HTTP issue occurs when at least 2000ms of time can be saved by parallelizing at least 3 consecutive HTTP calls occur sequentially.'
66+
),
67+
links: [
68+
{
69+
text: t('Sentry Docs: Consecutive HTTP'),
70+
link: 'https://docs.sentry.io/product/issues/issue-details/performance-issues/consecutive-http/',
71+
},
72+
],
73+
linksByPlatform: {},
74+
},
75+
},
76+
[IssueType.PERFORMANCE_N_PLUS_ONE_API_CALLS]: {
77+
resources: {
78+
description: t(
79+
'N+1 API Calls are repeated concurrent calls to fetch a resource. These spans will always begin at the same time and may potentially be combined to fetch everything at once to reduce server load. Alternatively, you may be able to lazily load the resources. To learn more about how and when to fix N+1 API Calls, check out these resources:'
80+
),
81+
links: [
82+
{
83+
text: t('Sentry Docs: N+1 API Calls'),
84+
link: 'https://docs.sentry.io/product/issues/issue-details/performance-issues/n-one-api-calls/',
85+
},
86+
],
87+
linksByPlatform: {},
88+
},
89+
},
90+
[IssueType.PERFORMANCE_N_PLUS_ONE_DB_QUERIES]: {
91+
resources: {
92+
description: t(
93+
"N+1 queries are extraneous queries (N) caused by a single, initial query (+1). In the Span Evidence section, we've identified the parent span where the extraneous spans are located and the extraneous spans themselves. To learn more about how to fix N+1 problems, check out these resources:"
94+
),
95+
links: [
96+
{
97+
text: t('Sentry Docs: N+1 Queries'),
98+
link: 'https://docs.sentry.io/product/issues/issue-details/performance-issues/n-one-queries/',
99+
},
100+
],
101+
linksByPlatform: {
102+
python: [
103+
{
104+
text: t('Finding and Fixing Django N+1 Problems'),
105+
link: 'https://blog.sentry.io/2020/09/14/finding-and-fixing-django-n-1-problems',
106+
},
107+
],
108+
'python-django': [
109+
{
110+
text: t('Finding and Fixing Django N+1 Problems'),
111+
link: 'https://blog.sentry.io/2020/09/14/finding-and-fixing-django-n-1-problems',
112+
},
113+
],
114+
},
115+
},
116+
},
117+
[IssueType.PERFORMANCE_HTTP_OVERHEAD]: {
118+
resources: {
119+
description: t(
120+
"HTTP/1.1 can cause overhead, with long request queue times in the browser due to max connection limits. In the Span Evidence section, we've identified the extent of the wait time and spans affected by request queueing. To learn more about how to fix HTTP Overhead, check out these resources:"
121+
),
122+
links: [
123+
{
124+
text: t('Sentry Docs: HTTP/1.1 Overhead'),
125+
link: 'https://docs.sentry.io/product/issues/issue-details/performance-issues/http-overhead/',
126+
},
127+
],
128+
linksByPlatform: {},
129+
},
130+
},
131+
[IssueType.PERFORMANCE_RENDER_BLOCKING_ASSET]: {
132+
resources: {
133+
description: t(
134+
'Large render blocking assets are a type of resource span delaying First Contentful Paint (FCP). Delaying FCP means it takes more time to initially load the page for the user. Spans that end after FCP are not as critical as those that end before it. The resource span may take form of a script, stylesheet, image, or other asset that requires optimization. To learn more about how to fix large render blocking assets, check out these resources:'
135+
),
136+
links: [
137+
{
138+
text: t('Web Vital: First Contentful Paint'),
139+
link: 'https://web.dev/fcp/',
140+
},
141+
],
142+
linksByPlatform: {},
143+
},
144+
},
145+
[IssueType.PERFORMANCE_SLOW_DB_QUERY]: {
146+
resources: {
147+
description: t(
148+
'Slow DB Queries are SELECT query spans that are consistently taking longer than 500ms. A quick method to understand why this may be the case is running an EXPLAIN command on the query itself. To learn more about how to fix slow DB queries, check out these resources:'
149+
),
150+
links: [
151+
{
152+
text: t('Sentry Docs: Slow DB Queries'),
153+
link: 'https://docs.sentry.io/product/issues/issue-details/performance-issues/slow-db-queries/',
154+
},
155+
],
156+
linksByPlatform: {},
157+
},
158+
},
159+
[IssueType.PERFORMANCE_LARGE_HTTP_PAYLOAD]: {
160+
resources: {
161+
description: t(
162+
'A Large HTTP Payload issue occurs when an http payload size consistently exceeds a threshold of 300KB'
163+
),
164+
links: [
165+
{
166+
text: t('Sentry Docs: Large HTTP Payload'),
167+
link: 'https://docs.sentry.io/product/issues/issue-details/performance-issues/large-http-payload/',
168+
},
169+
],
170+
linksByPlatform: {},
171+
},
172+
},
173+
[IssueType.PERFORMANCE_UNCOMPRESSED_ASSET]: {
174+
resources: {
175+
description: t(
176+
'Uncompressed assets are asset spans that take over 300ms and are larger than 512kB which can usually be made faster with compression. Check that your server or CDN serving your assets is accepting the content encoding header from the browser and is returning them compressed.'
177+
),
178+
links: [],
179+
linksByPlatform: {},
180+
},
181+
},
182+
};
183+
184+
export default performanceBestPracticeConfig;

0 commit comments

Comments
 (0)