-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat(billing): Gate trace metric bytes notification behind feature flag #112285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -251,6 +251,10 @@ export function NotificationSettingsByType({notificationType}: Props) { | |
| organization.features?.includes('logs-billing') | ||
| ); | ||
|
|
||
| const hasTraceMetricsBilling = organizations.some(organization => | ||
| organization.features?.includes('expose-category-trace-metric-byte') | ||
| ); | ||
|
|
||
| const hasSeerUserBilling = organizations.some(organization => | ||
| organization.features?.includes('seer-user-billing-launch') | ||
| ); | ||
|
|
@@ -282,6 +286,9 @@ export function NotificationSettingsByType({notificationType}: Props) { | |
| if (field.name.startsWith('quotaLogBytes') && !includeLogs) { | ||
| return false; | ||
| } | ||
| if (field.name.startsWith('quotaTraceMetricBytes') && !hasTraceMetricsBilling) { | ||
| return false; | ||
| } | ||
|
Comment on lines
+289
to
+291
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The feature flag gate for Suggested FixTo make the feature functional, change Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will be added in a separate PR i'm gating it first |
||
| if (field.name.startsWith('quotaSeerUsers') && !hasSeerUserBilling) { | ||
| return false; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Positive test missing assertion for Metrics (Bytes) visibility
Low Severity
The positive test case adds
expose-category-trace-metric-byteto the features list but never asserts thatMetrics (Bytes)is visible. Every other feature-gated category (profile hours, seer budget, logs, active contributors) has a correspondinggetByTextassertion in this test. The negative test at line 530 also passes vacuously becauseisBilledCategoryisfalseforTRACE_METRIC_BYTEinDATA_CATEGORY_INFO, meaning the fieldquotaTraceMetricBytesis never generated byCATEGORY_QUOTA_FIELDS— so the feature flag gating is never actually exercised by either test.Additional Locations (1)
static/app/views/settings/account/notifications/notificationSettingsByType.spec.tsx#L339-L352Reviewed by Cursor Bugbot for commit c3f80d6. Configure here.