Skip to content

Commit 152da3f

Browse files
krithikravigeorge-sentry
authored andcommitted
chore(billing): added trace metrics to byte categories(BIL-2221) (#112279)
https://linear.app/getsentry/issue/BIL-2221/convert-units-for-usage-total-cards-isbytecategory This PR adds byte usage formatting for trace metrics.
1 parent dc9b792 commit 152da3f

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎static/gsApp/utils/dataCategory.spec.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,10 @@ describe('listDisplayNames', () => {
416416
});
417417

418418
describe('isByteCategory', () => {
419-
it('verifies isByteCategory function handles both ATTACHMENTS and LOG_BYTE', () => {
419+
it('verifies isByteCategory function handles ATTACHMENTS, LOG_BYTE, and TRACE_METRIC_BYTE', () => {
420420
expect(isByteCategory(DataCategory.ATTACHMENTS)).toBe(true);
421421
expect(isByteCategory(DataCategory.LOG_BYTE)).toBe(true);
422+
expect(isByteCategory(DataCategory.TRACE_METRIC_BYTE)).toBe(true);
422423
expect(isByteCategory(DataCategory.ERRORS)).toBe(false);
423424
expect(isByteCategory(DataCategory.TRANSACTIONS)).toBe(false);
424425
});

‎static/gsApp/utils/dataCategory.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,11 @@ export function isContinuousProfiling(category: DataCategory | string) {
246246
}
247247

248248
export function isByteCategory(category: DataCategory | string) {
249-
return category === DataCategory.ATTACHMENTS || category === DataCategory.LOG_BYTE;
249+
return (
250+
category === DataCategory.ATTACHMENTS ||
251+
category === DataCategory.LOG_BYTE ||
252+
category === DataCategory.TRACE_METRIC_BYTE
253+
);
250254
}
251255

252256
/**

0 commit comments

Comments
 (0)