settings.ts 897 B

1234567891011121314151617181920212223
  1. import type {BadgeType} from 'sentry/components/badge/featureBadge';
  2. import {t} from 'sentry/locale';
  3. import type {SpanMetricsQueryFilters} from 'sentry/views/starfish/types';
  4. export const MODULE_TITLE = t('Cache');
  5. export const BASE_URL = 'cache';
  6. export const RELEASE_LEVEL: BadgeType = 'alpha';
  7. // NOTE: Awkward typing, but without it `RELEASE_LEVEL` is narrowed and the comparison is not allowed
  8. export const releaseLevelAsBadgeProps = {
  9. isAlpha: (RELEASE_LEVEL as BadgeType) === 'alpha',
  10. isBeta: (RELEASE_LEVEL as BadgeType) === 'beta',
  11. isNew: (RELEASE_LEVEL as BadgeType) === 'new',
  12. };
  13. export const CHART_HEIGHT = 160;
  14. export const CACHE_BASE_URL = `/performance/${BASE_URL}`;
  15. export const BASE_FILTERS: SpanMetricsQueryFilters = {
  16. 'span.op': 'cache.get_item', // TODO - add more span ops as they become available, we can't use span.module because db.redis is also `cache`
  17. };