Skip to content

Commit c0f7ecc

Browse files
jarrettscottandrewshie-sentry
authored andcommitted
feat(billing): Add support for PROFILE_DURATION_UI (#87452)
Closes: getsentry/getsentry#16662 Adds the new `PROFILE_DURATION_UI` data category to the lists associated with user and admin experiences, including product trials
1 parent d2511eb commit c0f7ecc

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

static/gsAdmin/components/planList.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ type LimitName =
1818
| 'reservedMonitorSeats'
1919
| 'reservedUptime'
2020
| 'reservedSpans'
21-
| 'reservedProfileDuration';
21+
| 'reservedProfileDuration'
22+
| 'reservedProfileDurationUI';
2223

2324
type Props = {
2425
onLimitChange: (limit: LimitName, value: number) => void;
@@ -29,6 +30,7 @@ type Props = {
2930
reservedErrors: null | number;
3031
reservedMonitorSeats: null | number;
3132
reservedProfileDuration: null | number;
33+
reservedProfileDurationUI: null | number;
3234
reservedReplays: null | number;
3335
reservedSpans: null | number;
3436
reservedTransactions: null | number;
@@ -44,6 +46,7 @@ const configurableCategories: DataCategory[] = [
4446
DataCategory.UPTIME,
4547
DataCategory.SPANS,
4648
DataCategory.PROFILE_DURATION,
49+
DataCategory.PROFILE_DURATION_UI,
4750
];
4851

4952
function PlanList({
@@ -56,6 +59,7 @@ function PlanList({
5659
reservedMonitorSeats,
5760
reservedUptime,
5861
reservedProfileDuration,
62+
reservedProfileDurationUI,
5963
reservedSpans,
6064
onPlanChange,
6165
onLimitChange,
@@ -155,6 +159,9 @@ function PlanList({
155159
case DataCategory.PROFILE_DURATION:
156160
fieldValue = reservedProfileDuration;
157161
break;
162+
case DataCategory.PROFILE_DURATION_UI:
163+
fieldValue = reservedProfileDurationUI;
164+
break;
158165
case DataCategory.UPTIME:
159166
fieldValue = reservedUptime;
160167
break;

static/gsApp/constants.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export const MAX_ADMIN_CATEGORY_GIFTS = {
3333
[DataCategory.UPTIME]: 10_000,
3434
[DataCategory.SPANS]: 1_000_000_000,
3535
[DataCategory.PROFILE_DURATION]: 10_000, // TODO(continuous profiling): confirm max amount
36+
[DataCategory.PROFILE_DURATION_UI]: 10_000, // TODO(continuous profiling): confirm max amount
3637
};
3738

3839
// While we no longer offer or support unlimited ondemand we still
@@ -56,4 +57,6 @@ export const PRODUCT_TRIAL_CATEGORIES: DataCategory[] = [
5657
DataCategory.REPLAYS,
5758
DataCategory.SPANS,
5859
DataCategory.TRANSACTIONS,
60+
DataCategory.PROFILE_DURATION,
61+
DataCategory.PROFILE_DURATION_UI,
5962
];

static/gsApp/views/subscriptionPage/usageTotals.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ export function calculateCategoryPrepaidUsage(
189189
prepaidTotal = prepaid * GIGABYTE;
190190
break;
191191
case DataCategory.PROFILE_DURATION:
192+
case DataCategory.PROFILE_DURATION_UI:
192193
prepaidTotal = prepaid * MILLISECONDS_IN_HOUR;
193194
break;
194195
default:

0 commit comments

Comments
 (0)