feat(billing): Add formatting configuration to DATA_CATEGORY_INFO formatting#104025
Merged
feat(billing): Add formatting configuration to DATA_CATEGORY_INFO formatting#104025
Conversation
11c4c9c to
0af1efd
Compare
3cd51e3 to
a7512c0
Compare
a7512c0 to
15bd4a0
Compare
…atting - Update mapReservedToChart to use formatting.reservedMultiplier instead of isByteCategory() check with GIGABYTE constant - Update formatProjected to use formatting.projectedAbbreviated instead of hardcoded DataCategory.ATTACHMENTS check - Export mapReservedToChart and add unit tests for multiplier logic Part of BIL-952: Move formatting functions to DATA_CATEGORY_INFO
15bd4a0 to
92375be
Compare
isabellaenriquez
approved these changes
Dec 10, 2025
| }); | ||
|
|
||
| describe('mapReservedToChart', () => { | ||
| it('should apply GIGABYTE multiplier for byte categories (attachments)', () => { |
Contributor
There was a problem hiding this comment.
nit: you could just cut down the tests to three for byte categories, duration categories, and count categories (plus the two edges cases for unlimited and null) since there isn't actually any differentiation between individual categories within those subsets
Remove duplicate tests for categories that share the same multiplier logic. Each multiplier type (byte, duration, count) now has a single representative test.
dashed
added a commit
that referenced
this pull request
Dec 12, 2025
…atting (#104688) Closes https://linear.app/getsentry/issue/BIL-1813/stack-3-migrate-format-functions-to-use-formatting-config Continues from #104025 - Update formatReservedWithUnits to use formatting.unitType instead of isByteCategory() check - Update formatUsageWithUnits to use formatting.unitType instead of isByteCategory() and isContinuousProfiling() checks - Update convertUsageToReservedUnit to use formatting.unitType - Remove unused imports of isByteCategory and isContinuousProfiling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes https://linear.app/getsentry/issue/BIL-1812/stack-2-migrate-chart-functions-to-use-formatting-config
Continues from #104023
mapReservedToChartto useformatting.reservedMultiplierinstead ofisByteCategory()check withGIGABYTEconstantformatProjectedto useformatting.projectedAbbreviatedinstead of hardcodedcategory !== DataCategory.ATTACHMENTScheckmapReservedToChartand add unit tests for multiplier logic