Skip to content

Commit ee33a8f

Browse files
feat(profileHours): add ui profile hours to stats page (#87135)
Adds UI profile hours category to frontend and closes getsentry/getsentry#16902
1 parent 6cdc103 commit ee33a8f

File tree

5 files changed

+29
-2
lines changed

5 files changed

+29
-2
lines changed

static/app/constants/index.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,16 @@ export const DATA_CATEGORY_INFO = {
377377
uid: 17,
378378
isBilledCategory: false, // TODO(Continuous Profiling GA): make true for launch to show spend notification toggle
379379
},
380+
[DataCategoryExact.PROFILE_DURATION_UI]: {
381+
name: DataCategoryExact.PROFILE_DURATION_UI,
382+
apiName: 'profile_duration_ui',
383+
plural: 'profileDurationUI',
384+
displayName: 'UI profile hour',
385+
titleName: t('UI Profile Hours'),
386+
productName: t('UI Profiling'),
387+
uid: 25,
388+
isBilledCategory: false, // TODO(Continuous Profiling GA): make true for launch to show spend notification toggle
389+
},
380390
[DataCategoryExact.UPTIME]: {
381391
name: DataCategoryExact.UPTIME,
382392
apiName: 'uptime',

static/app/types/core.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export enum DataCategory {
7979
REPLAYS = 'replays',
8080
MONITOR_SEATS = 'monitorSeats',
8181
PROFILE_DURATION = 'profileDuration',
82+
PROFILE_DURATION_UI = 'profileDurationUI',
8283
SPANS = 'spans',
8384
SPANS_INDEXED = 'spansIndexed',
8485
PROFILE_CHUNKS = 'profileChunks',
@@ -102,6 +103,7 @@ export enum DataCategoryExact {
102103
MONITOR = 'monitor',
103104
MONITOR_SEAT = 'monitorSeat',
104105
PROFILE_DURATION = 'profileDuration',
106+
PROFILE_DURATION_UI = 'profileDurationUI',
105107
SPAN = 'span',
106108
SPAN_INDEXED = 'spanIndexed',
107109
UPTIME = 'uptime',

static/app/utils/theme/theme.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,13 @@ const iconSizes: Sizes = {
911911
const dataCategory: Record<
912912
Exclude<
913913
DataCategory,
914-
'profiles' | 'profileChunks' | 'profileDuration' | 'spans' | 'spansIndexed' | 'uptime'
914+
| 'profiles'
915+
| 'profileChunks'
916+
| 'profileDuration'
917+
| 'profileDurationUI'
918+
| 'spans'
919+
| 'spansIndexed'
920+
| 'uptime'
915921
>,
916922
string
917923
> = {

static/app/views/organizationStats/index.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,10 @@ export class OrganizationStats extends Component<OrganizationStatsProps> {
263263
if (DATA_CATEGORY_INFO.transaction.plural === opt.value) {
264264
return !organization.features.includes('spans-usage-tracking');
265265
}
266-
if (DATA_CATEGORY_INFO.profileDuration.plural === opt.value) {
266+
if (
267+
DATA_CATEGORY_INFO.profileDuration.plural === opt.value ||
268+
DATA_CATEGORY_INFO.profileDurationUI.plural === opt.value
269+
) {
267270
return (
268271
organization.features.includes('continuous-profiling-stats') ||
269272
organization.features.includes('continuous-profiling')

static/app/views/organizationStats/usageChart/index.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ export const CHART_OPTIONS_DATACATEGORY: CategoryOption[] = [
8686
disabled: false,
8787
yAxisMinInterval: 100,
8888
},
89+
{
90+
label: DATA_CATEGORY_INFO.profileDurationUI.titleName,
91+
value: DATA_CATEGORY_INFO.profileDurationUI.plural,
92+
disabled: false,
93+
yAxisMinInterval: 100,
94+
},
8995
];
9096

9197
export enum ChartDataTransform {

0 commit comments

Comments
 (0)