settings.ts 1.2 KB

1234567891011121314151617181920212223242526272829
  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,cache.get]', // TODO - add more span ops as they become available, we can't use span.module because db.redis is also `cache`
  17. }; // TODO - Its akward to construct an array here, mutibleSearch should support array values
  18. export const ONBOARDING_CONTENT = {
  19. title: t('Start collecting Insights about your Caches!'),
  20. description: t('Our robot is waiting to collect your first cache hit.'),
  21. link: 'https://develop.sentry.dev/sdk/performance/modules/caches/',
  22. };