settings.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  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('Caches');
  5. export const BASE_URL = 'caches';
  6. export const RELEASE_LEVEL: BadgeType = 'beta';
  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 MODULE_DESCRIPTION = t(
  19. 'Discover whether your application is utilizing caching effectively and understand the latency associated with cache misses.'
  20. );
  21. export const MODULE_DOC_LINK = 'https://docs.sentry.io/product/performance/caches/';
  22. export const ONBOARDING_CONTENT = {
  23. title: t('Start collecting Insights about your Caches!'),
  24. description: t('Our robot is waiting to collect your first cache hit.'),
  25. link: MODULE_DOC_LINK,
  26. };