29
29
30
30
class GroupCategory (IntEnum ):
31
31
ERROR = 1
32
+ """
33
+ Deprecated
34
+ Will be broken out into PERFORMANCE_REGRESSION, PERFORMANCE_BEST_PRACTICE, and RESPONSIVENESS
35
+ """
32
36
PERFORMANCE = 2
33
37
PROFILE = 3 # deprecated, merging with PERFORMANCE
38
+ """
39
+ Deprecated
40
+ Cron types will move to the OUTAGE category
41
+ """
34
42
CRON = 4
43
+ """
44
+ Deprecated
45
+ Replay types will move to the USER_EXPERIENCE category
46
+ """
35
47
REPLAY = 5
36
48
FEEDBACK = 6
49
+ """
50
+ Deprecated
51
+ Uptime types will move to the OUTAGE category
52
+ """
37
53
UPTIME = 7
54
+ """
55
+ Deprecated
56
+ Metric alert types will move to the PERFORMANCE_REGRESSION category
57
+ """
38
58
METRIC_ALERT = 8
39
59
60
+ # New issue categories (under the organizations:issue-taxonomy flag)
61
+ OUTAGE = 9
62
+ PERFORMANCE_REGRESSION = 10
63
+ USER_EXPERIENCE = 11
64
+ RESPONSIVENESS = 12
65
+ PERFORMANCE_BEST_PRACTICE = 13
66
+
40
67
41
68
GROUP_CATEGORIES_CUSTOM_EMAIL = (
42
69
GroupCategory .ERROR ,
@@ -60,6 +87,7 @@ class GroupTypeRegistry:
60
87
_registry : dict [int , type [GroupType ]] = field (default_factory = dict )
61
88
_slug_lookup : dict [str , type [GroupType ]] = field (default_factory = dict )
62
89
_category_lookup : dict [int , set [int ]] = field (default_factory = lambda : defaultdict (set ))
90
+ _category_lookup_v2 : dict [int , set [int ]] = field (default_factory = lambda : defaultdict (set ))
63
91
64
92
def add (self , group_type : type [GroupType ]) -> None :
65
93
if self ._registry .get (group_type .type_id ):
@@ -69,6 +97,7 @@ def add(self, group_type: type[GroupType]) -> None:
69
97
self ._registry [group_type .type_id ] = group_type
70
98
self ._slug_lookup [group_type .slug ] = group_type
71
99
self ._category_lookup [group_type .category ].add (group_type .type_id )
100
+ self ._category_lookup_v2 [group_type .category_v2 ].add (group_type .type_id )
72
101
73
102
def all (self ) -> list [type [GroupType ]]:
74
103
return list (self ._registry .values ())
@@ -105,6 +134,9 @@ def get_all_group_type_ids(self) -> set[int]:
105
134
def get_by_category (self , category : int ) -> set [int ]:
106
135
return self ._category_lookup [category ]
107
136
137
+ def get_by_category_v2 (self , category : int ) -> set [int ]:
138
+ return self ._category_lookup_v2 [category ]
139
+
108
140
def get_by_slug (self , slug : str ) -> type [GroupType ] | None :
109
141
if slug not in self ._slug_lookup :
110
142
return None
@@ -160,6 +192,9 @@ class GroupType:
160
192
slug : str
161
193
description : str
162
194
category : int
195
+ # New issue category mapping (under the organizations:issue-taxonomy flag)
196
+ # When GA'd, the original `category` will be removed and this will be renamed to `category`.
197
+ category_v2 : int
163
198
noise_config : NoiseConfig | None = None
164
199
default_priority : int = PriorityLevel .MEDIUM
165
200
# If True this group type should be released everywhere. If False, fall back to features to
@@ -271,6 +306,7 @@ class PerformanceSlowDBQueryGroupType(PerformanceGroupTypeDefaults, GroupType):
271
306
slug = "performance_slow_db_query"
272
307
description = "Slow DB Query"
273
308
category = GroupCategory .PERFORMANCE .value
309
+ category_v2 = GroupCategory .PERFORMANCE_BEST_PRACTICE .value
274
310
noise_config = NoiseConfig (ignore_limit = 100 )
275
311
default_priority = PriorityLevel .LOW
276
312
released = True
@@ -282,6 +318,7 @@ class PerformanceRenderBlockingAssetSpanGroupType(PerformanceGroupTypeDefaults,
282
318
slug = "performance_render_blocking_asset_span"
283
319
description = "Large Render Blocking Asset"
284
320
category = GroupCategory .PERFORMANCE .value
321
+ category_v2 = GroupCategory .RESPONSIVENESS .value
285
322
default_priority = PriorityLevel .LOW
286
323
released = True
287
324
use_flagpole_for_all_features = True
@@ -293,6 +330,7 @@ class PerformanceNPlusOneGroupType(PerformanceGroupTypeDefaults, GroupType):
293
330
slug = "performance_n_plus_one_db_queries"
294
331
description = "N+1 Query"
295
332
category = GroupCategory .PERFORMANCE .value
333
+ category_v2 = GroupCategory .PERFORMANCE_BEST_PRACTICE .value
296
334
default_priority = PriorityLevel .LOW
297
335
released = True
298
336
@@ -303,6 +341,7 @@ class PerformanceConsecutiveDBQueriesGroupType(PerformanceGroupTypeDefaults, Gro
303
341
slug = "performance_consecutive_db_queries"
304
342
description = "Consecutive DB Queries"
305
343
category = GroupCategory .PERFORMANCE .value
344
+ category_v2 = GroupCategory .PERFORMANCE_BEST_PRACTICE .value
306
345
noise_config = NoiseConfig (ignore_limit = 15 )
307
346
default_priority = PriorityLevel .LOW
308
347
released = True
@@ -314,6 +353,7 @@ class PerformanceFileIOMainThreadGroupType(PerformanceGroupTypeDefaults, GroupTy
314
353
slug = "performance_file_io_main_thread"
315
354
description = "File IO on Main Thread"
316
355
category = GroupCategory .PERFORMANCE .value
356
+ category_v2 = GroupCategory .RESPONSIVENESS .value
317
357
default_priority = PriorityLevel .LOW
318
358
released = True
319
359
@@ -324,6 +364,7 @@ class PerformanceConsecutiveHTTPQueriesGroupType(PerformanceGroupTypeDefaults, G
324
364
slug = "performance_consecutive_http"
325
365
description = "Consecutive HTTP"
326
366
category = GroupCategory .PERFORMANCE .value
367
+ category_v2 = GroupCategory .PERFORMANCE_BEST_PRACTICE .value
327
368
noise_config = NoiseConfig (ignore_limit = 5 )
328
369
default_priority = PriorityLevel .LOW
329
370
released = True
@@ -335,6 +376,7 @@ class PerformanceNPlusOneAPICallsGroupType(GroupType):
335
376
slug = "performance_n_plus_one_api_calls"
336
377
description = "N+1 API Call"
337
378
category = GroupCategory .PERFORMANCE .value
379
+ category_v2 = GroupCategory .PERFORMANCE_BEST_PRACTICE .value
338
380
default_priority = PriorityLevel .LOW
339
381
released = True
340
382
@@ -345,6 +387,7 @@ class PerformanceMNPlusOneDBQueriesGroupType(PerformanceGroupTypeDefaults, Group
345
387
slug = "performance_m_n_plus_one_db_queries"
346
388
description = "MN+1 Query"
347
389
category = GroupCategory .PERFORMANCE .value
390
+ category_v2 = GroupCategory .PERFORMANCE_BEST_PRACTICE .value
348
391
default_priority = PriorityLevel .LOW
349
392
released = True
350
393
@@ -355,6 +398,7 @@ class PerformanceUncompressedAssetsGroupType(PerformanceGroupTypeDefaults, Group
355
398
slug = "performance_uncompressed_assets"
356
399
description = "Uncompressed Asset"
357
400
category = GroupCategory .PERFORMANCE .value
401
+ category_v2 = GroupCategory .PERFORMANCE_BEST_PRACTICE .value
358
402
noise_config = NoiseConfig (ignore_limit = 100 )
359
403
default_priority = PriorityLevel .LOW
360
404
released = True
@@ -366,6 +410,7 @@ class PerformanceDBMainThreadGroupType(PerformanceGroupTypeDefaults, GroupType):
366
410
slug = "performance_db_main_thread"
367
411
description = "DB on Main Thread"
368
412
category = GroupCategory .PERFORMANCE .value
413
+ category_v2 = GroupCategory .RESPONSIVENESS .value
369
414
default_priority = PriorityLevel .LOW
370
415
released = True
371
416
@@ -376,6 +421,7 @@ class PerformanceLargeHTTPPayloadGroupType(PerformanceGroupTypeDefaults, GroupTy
376
421
slug = "performance_large_http_payload"
377
422
description = "Large HTTP payload"
378
423
category = GroupCategory .PERFORMANCE .value
424
+ category_v2 = GroupCategory .PERFORMANCE_BEST_PRACTICE .value
379
425
default_priority = PriorityLevel .LOW
380
426
released = True
381
427
@@ -387,6 +433,7 @@ class PerformanceHTTPOverheadGroupType(PerformanceGroupTypeDefaults, GroupType):
387
433
description = "HTTP/1.1 Overhead"
388
434
noise_config = NoiseConfig (ignore_limit = 20 )
389
435
category = GroupCategory .PERFORMANCE .value
436
+ category_v2 = GroupCategory .RESPONSIVENESS .value
390
437
default_priority = PriorityLevel .LOW
391
438
released = True
392
439
@@ -397,6 +444,7 @@ class PerformanceP95EndpointRegressionGroupType(GroupType):
397
444
slug = "performance_p95_endpoint_regression"
398
445
description = "Endpoint Regression"
399
446
category = GroupCategory .PERFORMANCE .value
447
+ category_v2 = GroupCategory .PERFORMANCE_REGRESSION .value
400
448
enable_auto_resolve = False
401
449
enable_escalation_detection = False
402
450
default_priority = PriorityLevel .MEDIUM
@@ -411,6 +459,7 @@ class PerformanceStreamedSpansGroupTypeExperimental(GroupType):
411
459
slug = "performance_streamed_spans_exp"
412
460
description = "Streamed Spans (Experimental)"
413
461
category = GroupCategory .PERFORMANCE .value
462
+ category_v2 = GroupCategory .PERFORMANCE_BEST_PRACTICE .value
414
463
enable_auto_resolve = False
415
464
enable_escalation_detection = False
416
465
default_priority = PriorityLevel .LOW
@@ -423,6 +472,7 @@ class ProfileFileIOGroupType(GroupType):
423
472
slug = "profile_file_io_main_thread"
424
473
description = "File I/O on Main Thread"
425
474
category = GroupCategory .PERFORMANCE .value
475
+ category_v2 = GroupCategory .RESPONSIVENESS .value
426
476
default_priority = PriorityLevel .LOW
427
477
released = True
428
478
@@ -433,6 +483,7 @@ class ProfileImageDecodeGroupType(GroupType):
433
483
slug = "profile_image_decode_main_thread"
434
484
description = "Image Decoding on Main Thread"
435
485
category = GroupCategory .PERFORMANCE .value
486
+ category_v2 = GroupCategory .RESPONSIVENESS .value
436
487
default_priority = PriorityLevel .LOW
437
488
released = True
438
489
@@ -443,6 +494,7 @@ class ProfileJSONDecodeType(GroupType):
443
494
slug = "profile_json_decode_main_thread"
444
495
description = "JSON Decoding on Main Thread"
445
496
category = GroupCategory .PERFORMANCE .value
497
+ category_v2 = GroupCategory .RESPONSIVENESS .value
446
498
default_priority = PriorityLevel .LOW
447
499
released = True
448
500
@@ -453,6 +505,7 @@ class ProfileRegexType(GroupType):
453
505
slug = "profile_regex_main_thread"
454
506
description = "Regex on Main Thread"
455
507
category = GroupCategory .PERFORMANCE .value
508
+ category_v2 = GroupCategory .RESPONSIVENESS .value
456
509
released = True
457
510
default_priority = PriorityLevel .LOW
458
511
@@ -463,6 +516,7 @@ class ProfileFrameDropType(GroupType):
463
516
slug = "profile_frame_drop"
464
517
description = "Frame Drop"
465
518
category = GroupCategory .PERFORMANCE .value
519
+ category_v2 = GroupCategory .RESPONSIVENESS .value
466
520
noise_config = NoiseConfig (ignore_limit = 2000 )
467
521
released = True
468
522
default_priority = PriorityLevel .LOW
@@ -474,6 +528,7 @@ class ProfileFunctionRegressionType(GroupType):
474
528
slug = "profile_function_regression"
475
529
description = "Function Regression"
476
530
category = GroupCategory .PERFORMANCE .value
531
+ category_v2 = GroupCategory .PERFORMANCE_BEST_PRACTICE .value
477
532
enable_auto_resolve = False
478
533
released = True
479
534
default_priority = PriorityLevel .MEDIUM
@@ -486,6 +541,7 @@ class MonitorIncidentType(GroupType):
486
541
slug = "monitor_check_in_failure"
487
542
description = "Crons Monitor Failed"
488
543
category = GroupCategory .CRON .value
544
+ category_v2 = GroupCategory .OUTAGE .value
489
545
released = True
490
546
creation_quota = Quota (3600 , 60 , 60_000 ) # 60,000 per hour, sliding window of 60 seconds
491
547
default_priority = PriorityLevel .HIGH
@@ -515,6 +571,7 @@ class ReplayRageClickType(ReplayGroupTypeDefaults, GroupType):
515
571
slug = "replay_click_rage"
516
572
description = "Rage Click Detected"
517
573
category = GroupCategory .REPLAY .value
574
+ category_v2 = GroupCategory .USER_EXPERIENCE .value
518
575
default_priority = PriorityLevel .MEDIUM
519
576
notification_config = NotificationConfig ()
520
577
released = True
@@ -526,6 +583,7 @@ class ReplayHydrationErrorType(ReplayGroupTypeDefaults, GroupType):
526
583
slug = "replay_hydration_error"
527
584
description = "Hydration Error Detected"
528
585
category = GroupCategory .REPLAY .value
586
+ category_v2 = GroupCategory .USER_EXPERIENCE .value
529
587
default_priority = PriorityLevel .MEDIUM
530
588
notification_config = NotificationConfig ()
531
589
released = True
@@ -537,6 +595,7 @@ class FeedbackGroup(GroupType):
537
595
slug = "feedback"
538
596
description = "Feedback"
539
597
category = GroupCategory .FEEDBACK .value
598
+ category_v2 = GroupCategory .FEEDBACK .value
540
599
creation_quota = Quota (3600 , 60 , 1000 ) # 1000 per hour, sliding window of 60 seconds
541
600
default_priority = PriorityLevel .MEDIUM
542
601
notification_config = NotificationConfig (context = [])
@@ -552,6 +611,7 @@ class MetricIssuePOC(GroupType):
552
611
slug = "metric_issue_poc"
553
612
description = "Metric Issue POC"
554
613
category = GroupCategory .METRIC_ALERT .value
614
+ category_v2 = GroupCategory .PERFORMANCE_REGRESSION .value
555
615
default_priority = PriorityLevel .HIGH
556
616
enable_auto_resolve = False
557
617
enable_escalation_detection = False
0 commit comments