Skip to content

Commit

Permalink
chore(metrics): remove meta datetime param
Browse files Browse the repository at this point in the history
  • Loading branch information
obostjancic committed May 15, 2024
1 parent 4041470 commit 9294271
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions static/app/utils/metrics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ export function getAbsoluteDateTimeRange(params: PageFilters['datetime']) {
return {start: startObj.toISOString(), end: now.toISOString()};
}

// TODO(metrics): remove this when we switch tags to the new meta
export function getMetaDateTimeParams(datetime?: PageFilters['datetime']) {
if (datetime?.period) {
if (statsPeriodToDays(datetime.period) < 14) {
Expand Down
8 changes: 2 additions & 6 deletions static/app/utils/metrics/useMetricsMeta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@ import useOrganization from 'sentry/utils/useOrganization';

import type {MetricMeta, MRI, UseCase} from '../../types/metrics';

import {getMetaDateTimeParams} from './index';

const DEFAULT_USE_CASES: UseCase[] = ['sessions', 'transactions', 'custom', 'spans'];

export function getMetricsMetaQueryKey(
orgSlug: string,
{projects, datetime}: Partial<PageFilters>,
{projects}: Partial<PageFilters>,
useCase?: UseCase[]
): ApiQueryKey {
const queryParams = projects?.length
? {useCase, project: projects, ...getMetaDateTimeParams(datetime)}
: {useCase, ...getMetaDateTimeParams(datetime)};
const queryParams = projects?.length ? {useCase, project: projects} : {useCase};
return [`/organizations/${orgSlug}/metrics/meta/`, {query: queryParams}];
}

Expand Down

0 comments on commit 9294271

Please sign in to comment.