|
@@ -11,6 +11,7 @@ import sentry_sdk
|
|
|
from sentry import features
|
|
|
from sentry.features.base import OrganizationFeature
|
|
|
from sentry.ratelimits.sliding_windows import Quota
|
|
|
+from sentry.types.group import PriorityLevel
|
|
|
from sentry.utils import metrics
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
@@ -116,6 +117,7 @@ class GroupType:
|
|
|
description: str
|
|
|
category: int
|
|
|
noise_config: NoiseConfig | None = None
|
|
|
+ default_priority: int = PriorityLevel.MEDIUM
|
|
|
# If True this group type should be released everywhere. If False, fall back to features to
|
|
|
# decide if this is released.
|
|
|
released: bool = False
|
|
@@ -217,6 +219,7 @@ class ErrorGroupType(GroupType):
|
|
|
slug = "error"
|
|
|
description = "Error"
|
|
|
category = GroupCategory.ERROR.value
|
|
|
+ default_priority = PriorityLevel.MEDIUM
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -232,6 +235,7 @@ class PerformanceSlowDBQueryGroupType(PerformanceGroupTypeDefaults, GroupType):
|
|
|
description = "Slow DB Query"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
noise_config = NoiseConfig(ignore_limit=100)
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -241,6 +245,7 @@ class PerformanceRenderBlockingAssetSpanGroupType(PerformanceGroupTypeDefaults,
|
|
|
slug = "performance_render_blocking_asset_span"
|
|
|
description = "Large Render Blocking Asset"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -250,6 +255,7 @@ class PerformanceNPlusOneGroupType(PerformanceGroupTypeDefaults, GroupType):
|
|
|
slug = "performance_n_plus_one_db_queries"
|
|
|
description = "N+1 Query"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -260,6 +266,7 @@ class PerformanceConsecutiveDBQueriesGroupType(PerformanceGroupTypeDefaults, Gro
|
|
|
description = "Consecutive DB Queries"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
noise_config = NoiseConfig(ignore_limit=15)
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -269,6 +276,7 @@ class PerformanceFileIOMainThreadGroupType(PerformanceGroupTypeDefaults, GroupTy
|
|
|
slug = "performance_file_io_main_thread"
|
|
|
description = "File IO on Main Thread"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -279,6 +287,7 @@ class PerformanceConsecutiveHTTPQueriesGroupType(PerformanceGroupTypeDefaults, G
|
|
|
description = "Consecutive HTTP"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
noise_config = NoiseConfig(ignore_limit=5)
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -288,6 +297,7 @@ class PerformanceNPlusOneAPICallsGroupType(GroupType):
|
|
|
slug = "performance_n_plus_one_api_calls"
|
|
|
description = "N+1 API Call"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -297,6 +307,7 @@ class PerformanceMNPlusOneDBQueriesGroupType(PerformanceGroupTypeDefaults, Group
|
|
|
slug = "performance_m_n_plus_one_db_queries"
|
|
|
description = "MN+1 Query"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -307,6 +318,7 @@ class PerformanceUncompressedAssetsGroupType(PerformanceGroupTypeDefaults, Group
|
|
|
description = "Uncompressed Asset"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
noise_config = NoiseConfig(ignore_limit=100)
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -316,6 +328,7 @@ class PerformanceDBMainThreadGroupType(PerformanceGroupTypeDefaults, GroupType):
|
|
|
slug = "performance_db_main_thread"
|
|
|
description = "DB on Main Thread"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -325,6 +338,7 @@ class PerformanceLargeHTTPPayloadGroupType(PerformanceGroupTypeDefaults, GroupTy
|
|
|
slug = "performance_large_http_payload"
|
|
|
description = "Large HTTP payload"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -335,6 +349,7 @@ class PerformanceHTTPOverheadGroupType(PerformanceGroupTypeDefaults, GroupType):
|
|
|
description = "HTTP/1.1 Overhead"
|
|
|
noise_config = NoiseConfig(ignore_limit=20)
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
|
|
|
|
|
|
# experimental
|
|
@@ -346,6 +361,7 @@ class PerformanceDurationRegressionGroupType(GroupType):
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
enable_auto_resolve = False
|
|
|
enable_escalation_detection = False
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -356,6 +372,7 @@ class PerformanceP95EndpointRegressionGroupType(GroupType):
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
enable_auto_resolve = False
|
|
|
enable_escalation_detection = False
|
|
|
+ default_priority = PriorityLevel.MEDIUM
|
|
|
released = True
|
|
|
|
|
|
|
|
@@ -366,6 +383,7 @@ class ProfileFileIOGroupType(GroupType):
|
|
|
slug = "profile_file_io_main_thread"
|
|
|
description = "File I/O on Main Thread"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -374,6 +392,7 @@ class ProfileImageDecodeGroupType(GroupType):
|
|
|
slug = "profile_image_decode_main_thread"
|
|
|
description = "Image Decoding on Main Thread"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -382,6 +401,7 @@ class ProfileJSONDecodeType(GroupType):
|
|
|
slug = "profile_json_decode_main_thread"
|
|
|
description = "JSON Decoding on Main Thread"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -390,17 +410,17 @@ class ProfileCoreDataExperimentalType(GroupType):
|
|
|
slug = "profile_core_data_main_exp"
|
|
|
description = "Core Data on Main Thread"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
|
|
|
|
|
|
# 2005 was ProfileRegexExperimentalType
|
|
|
-
|
|
|
-
|
|
|
@dataclass(frozen=True)
|
|
|
class ProfileViewIsSlowExperimentalType(GroupType):
|
|
|
type_id = 2006
|
|
|
slug = "profile_view_is_slow_experimental"
|
|
|
description = "View Render/Layout/Update is slow"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -410,6 +430,7 @@ class ProfileRegexType(GroupType):
|
|
|
description = "Regex on Main Thread"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
released = True
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -418,6 +439,7 @@ class ProfileFrameDropExperimentalType(GroupType):
|
|
|
slug = "profile_frame_drop_experimental"
|
|
|
description = "Frame Drop"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -428,6 +450,7 @@ class ProfileFrameDropType(GroupType):
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
noise_config = NoiseConfig(ignore_limit=2000)
|
|
|
released = True
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -437,6 +460,7 @@ class ProfileFunctionRegressionExperimentalType(GroupType):
|
|
|
description = "Function Duration Regression (Experimental)"
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
enable_auto_resolve = False
|
|
|
+ default_priority = PriorityLevel.LOW
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -447,6 +471,7 @@ class ProfileFunctionRegressionType(GroupType):
|
|
|
category = GroupCategory.PERFORMANCE.value
|
|
|
enable_auto_resolve = False
|
|
|
released = True
|
|
|
+ default_priority = PriorityLevel.MEDIUM
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -457,6 +482,7 @@ class MonitorCheckInFailure(GroupType):
|
|
|
category = GroupCategory.CRON.value
|
|
|
released = True
|
|
|
creation_quota = Quota(3600, 60, 60_000) # 60,000 per hour, sliding window of 60 seconds
|
|
|
+ default_priority = PriorityLevel.HIGH
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -467,6 +493,7 @@ class MonitorCheckInTimeout(GroupType):
|
|
|
category = GroupCategory.CRON.value
|
|
|
released = True
|
|
|
creation_quota = Quota(3600, 60, 60_000) # 60,000 per hour, sliding window of 60 seconds
|
|
|
+ default_priority = PriorityLevel.HIGH
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -477,6 +504,7 @@ class MonitorCheckInMissed(GroupType):
|
|
|
category = GroupCategory.CRON.value
|
|
|
released = True
|
|
|
creation_quota = Quota(3600, 60, 60_000) # 60,000 per hour, sliding window of 60 seconds
|
|
|
+ default_priority = PriorityLevel.HIGH
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -486,6 +514,7 @@ class ReplayDeadClickType(GroupType):
|
|
|
slug = "replay_click_dead"
|
|
|
description = "Dead Click Detected"
|
|
|
category = GroupCategory.REPLAY.value
|
|
|
+ default_priority = PriorityLevel.MEDIUM
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -494,6 +523,7 @@ class ReplayRageClickType(GroupType):
|
|
|
slug = "replay_click_rage"
|
|
|
description = "Rage Click Detected"
|
|
|
category = GroupCategory.REPLAY.value
|
|
|
+ default_priority = PriorityLevel.MEDIUM
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
@@ -503,6 +533,7 @@ class FeedbackGroup(GroupType):
|
|
|
description = "Feedback"
|
|
|
category = GroupCategory.FEEDBACK.value
|
|
|
creation_quota = Quota(3600, 60, 1000) # 1000 per hour, sliding window of 60 seconds
|
|
|
+ default_priority = PriorityLevel.MEDIUM
|
|
|
|
|
|
|
|
|
@metrics.wraps("noise_reduction.should_create_group", sample_rate=1.0)
|