diff --git a/static/app/constants/index.tsx b/static/app/constants/index.tsx index 77ef36e628ec49..24595fea3b249f 100644 --- a/static/app/constants/index.tsx +++ b/static/app/constants/index.tsx @@ -318,9 +318,9 @@ export const DATA_CATEGORY_INFO = { titleName: t('Cron Monitors'), uid: 13, }, - [DataCategoryExact.METRICS]: { - name: DataCategoryExact.METRICS, - apiName: 'metrics', + [DataCategoryExact.METRIC_SECOND]: { + name: DataCategoryExact.METRIC_SECOND, + apiName: 'metricSecond', plural: 'metrics', displayName: 'metrics', titleName: t('Metrics'), diff --git a/static/app/types/core.tsx b/static/app/types/core.tsx index cdbba78fe44275..8077bee8f9f522 100644 --- a/static/app/types/core.tsx +++ b/static/app/types/core.tsx @@ -80,6 +80,7 @@ export enum DataCategory { PROFILES = 'profiles', REPLAYS = 'replays', MONITOR_SEATS = 'monitorSeats', + METRIC_SECOND = 'metricSecond', } /** @@ -97,7 +98,7 @@ export enum DataCategoryExact { TRANSACTION_INDEXED = 'transaction_indexed', MONITOR = 'monitor', MONITOR_SEAT = 'monitorSeat', - METRICS = 'metrics', + METRIC_SECOND = 'metricSecond', } export interface DataCategoryInfo { diff --git a/static/app/views/organizationStats/index.tsx b/static/app/views/organizationStats/index.tsx index 6912f98afdd15f..9bdfe772a5b916 100644 --- a/static/app/views/organizationStats/index.tsx +++ b/static/app/views/organizationStats/index.tsx @@ -263,7 +263,7 @@ export class OrganizationStats extends Component { if (opt.value === DATA_CATEGORY_INFO.replay.plural) { return organization.features.includes('session-replay'); } - if (opt.value === DATA_CATEGORY_INFO.metrics.plural) { + if (opt.value === DATA_CATEGORY_INFO.metricSecond.plural) { return hasMetricStats(organization); } return true; @@ -321,7 +321,7 @@ export class OrganizationStats extends Component { if (opt.value === DATA_CATEGORY_INFO.replay.plural) { return organization.features.includes('session-replay'); } - if (opt.value === DATA_CATEGORY_INFO.metrics.plural) { + if (opt.value === DATA_CATEGORY_INFO.metricSecond.plural) { return hasMetricStats(organization); } return true; diff --git a/static/app/views/organizationStats/usageChart/index.tsx b/static/app/views/organizationStats/usageChart/index.tsx index 5b0c2435081be6..07129efb28bae4 100644 --- a/static/app/views/organizationStats/usageChart/index.tsx +++ b/static/app/views/organizationStats/usageChart/index.tsx @@ -89,8 +89,8 @@ export const CHART_OPTIONS_DATACATEGORY: CategoryOption[] = [ yAxisMinInterval: 100, }, { - label: DATA_CATEGORY_INFO.metrics.titleName, - value: DATA_CATEGORY_INFO.metrics.plural, + label: DATA_CATEGORY_INFO.metricSecond.titleName, + value: DATA_CATEGORY_INFO.metricSecond.plural, disabled: false, yAxisMinInterval: 100, }, @@ -360,7 +360,7 @@ function UsageChartBody({ const filteredOptions = useMemo(() => { return categoryOptions.filter(option => { - if (option.value !== DATA_CATEGORY_INFO.metrics.plural) { + if (option.value !== DATA_CATEGORY_INFO.metricSecond.plural) { return true; } return ( diff --git a/static/app/views/organizationStats/usageStatsOrg.tsx b/static/app/views/organizationStats/usageStatsOrg.tsx index 66b1cd1d50450b..67bebd2054c5ea 100644 --- a/static/app/views/organizationStats/usageStatsOrg.tsx +++ b/static/app/views/organizationStats/usageStatsOrg.tsx @@ -136,7 +136,7 @@ class UsageStatsOrganization< { query: { ...this.endpointQuery, - category: DATA_CATEGORY_INFO.metrics.apiName, + category: DATA_CATEGORY_INFO.metricSecond.apiName, groupBy: ['outcome'], }, }, @@ -159,7 +159,7 @@ class UsageStatsOrganization< ...group, by: { ...group.by, - category: DATA_CATEGORY_INFO.metrics.apiName, + category: DATA_CATEGORY_INFO.metricSecond.apiName, }, }; }); @@ -345,7 +345,7 @@ class UsageStatsOrganization< filtered: { title: tct('Filtered [dataCategory]', {dataCategory: dataCategoryName}), help: - dataCategory === DATA_CATEGORY_INFO.metrics.plural + dataCategory === DATA_CATEGORY_INFO.metricSecond.plural ? tct( 'Filtered metrics were blocked due to your disabled metrics [settings: settings]', { diff --git a/static/app/views/organizationStats/usageStatsPerMin.tsx b/static/app/views/organizationStats/usageStatsPerMin.tsx index d3dd2efbb03cb9..49cad934d6fd64 100644 --- a/static/app/views/organizationStats/usageStatsPerMin.tsx +++ b/static/app/views/organizationStats/usageStatsPerMin.tsx @@ -78,7 +78,7 @@ function UsageStatsPerMin({dataCategory, organization, projectIds}: Props) { }; // Metrics stats ingestion is delayed, so we can't show this for metrics right now - if (dataCategory === DATA_CATEGORY_INFO.metrics.plural) { + if (dataCategory === DATA_CATEGORY_INFO.metricSecond.plural) { return null; }