Skip to content

Commit fd9e89e

Browse files
feat(billing): Add notification setting for trace metric bytes
Add QUOTA_TRACE_METRIC_BYTES to NotificationSettingEnum so users can manage quota notifications for the trace_metric_bytes data category, matching the pattern used for other quota notification types. Refs BIL-2216 Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> Made-with: Cursor
1 parent 99d283d commit fd9e89e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/sentry/notifications/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class NotificationSettingEnum(ValueEqualityEnum):
3434
QUOTA_SEER_BUDGET = "quotaSeerBudget"
3535
QUOTA_SPEND_ALLOCATIONS = "quotaSpendAllocations"
3636
QUOTA_LOG_BYTES = "quotaLogBytes"
37+
QUOTA_TRACE_METRIC_BYTES = "quotaTraceMetricBytes"
3738
QUOTA_SEER_USERS = "quotaSeerUsers"
3839
QUOTA_SIZE_ANALYSIS = "quotaSizeAnalyses"
3940
SPIKE_PROTECTION = "spikeProtection"
@@ -152,6 +153,10 @@ class UserOptionsSettingsKey(Enum):
152153
NotificationSettingsOptionEnum.ALWAYS,
153154
NotificationSettingsOptionEnum.NEVER,
154155
},
156+
NotificationSettingEnum.QUOTA_TRACE_METRIC_BYTES: {
157+
NotificationSettingsOptionEnum.ALWAYS,
158+
NotificationSettingsOptionEnum.NEVER,
159+
},
155160
NotificationSettingEnum.QUOTA_SEER_USERS: {
156161
NotificationSettingsOptionEnum.ALWAYS,
157162
NotificationSettingsOptionEnum.NEVER,

tests/sentry/notifications/api/endpoints/test_user_notification_settings_options.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def test_user_scope(self) -> None:
104104
NotificationSettingEnum.QUOTA_MONITOR_SEATS,
105105
NotificationSettingEnum.QUOTA_SPANS,
106106
NotificationSettingEnum.QUOTA_LOG_BYTES,
107+
NotificationSettingEnum.QUOTA_TRACE_METRIC_BYTES,
107108
NotificationSettingEnum.QUOTA_SEER_USERS,
108109
NotificationSettingEnum.QUOTA_SIZE_ANALYSIS,
109110
]

0 commit comments

Comments
 (0)