Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions static/app/constants/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
3 changes: 2 additions & 1 deletion static/app/types/core.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export enum DataCategory {
PROFILES = 'profiles',
REPLAYS = 'replays',
MONITOR_SEATS = 'monitorSeats',
METRIC_SECOND = 'metricSecond',
}

/**
Expand All @@ -97,7 +98,7 @@ export enum DataCategoryExact {
TRANSACTION_INDEXED = 'transaction_indexed',
MONITOR = 'monitor',
MONITOR_SEAT = 'monitorSeat',
METRICS = 'metrics',
METRIC_SECOND = 'metricSecond',
}

export interface DataCategoryInfo {
Expand Down
4 changes: 2 additions & 2 deletions static/app/views/organizationStats/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export class OrganizationStats extends Component<OrganizationStatsProps> {
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;
Expand Down Expand Up @@ -321,7 +321,7 @@ export class OrganizationStats extends Component<OrganizationStatsProps> {
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;
Expand Down
6 changes: 3 additions & 3 deletions static/app/views/organizationStats/usageChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down Expand Up @@ -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 (
Expand Down
6 changes: 3 additions & 3 deletions static/app/views/organizationStats/usageStatsOrg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class UsageStatsOrganization<
{
query: {
...this.endpointQuery,
category: DATA_CATEGORY_INFO.metrics.apiName,
category: DATA_CATEGORY_INFO.metricSecond.apiName,
groupBy: ['outcome'],
},
},
Expand All @@ -159,7 +159,7 @@ class UsageStatsOrganization<
...group,
by: {
...group.by,
category: DATA_CATEGORY_INFO.metrics.apiName,
category: DATA_CATEGORY_INFO.metricSecond.apiName,
},
};
});
Expand Down Expand Up @@ -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]',
{
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/organizationStats/usageStatsPerMin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down