utils.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import {t} from 'sentry/locale';
  2. import {DataCategory} from 'sentry/types/core';
  3. import {PlanTier} from 'getsentry/types';
  4. export function getDataCategoryTooltipText(
  5. planTier: PlanTier | undefined,
  6. category: DataCategory | string
  7. ): string | null {
  8. switch (category) {
  9. case DataCategory.TRANSACTIONS:
  10. return t(
  11. 'Transactions are sent when your service receives a request and sends a response.'
  12. );
  13. case DataCategory.REPLAYS:
  14. return t(
  15. 'Session Replays are video-like reproductions of your users’ sessions navigating your app or website.'
  16. );
  17. case DataCategory.ATTACHMENTS:
  18. return t('Attachments are files attached to errors, such as minidumps.');
  19. case DataCategory.ERRORS:
  20. return t(
  21. 'Errors are sent every time an SDK catches a bug. You can send them manually too, if you want.'
  22. );
  23. case DataCategory.MONITOR_SEATS:
  24. return t(
  25. 'Cron Monitors track if your scheduled jobs run as expected. Get one monitor for free, and can purchase more by setting %s budget.',
  26. planTier === PlanTier.AM3 ? 'a pay-as-you-go' : 'an on-demand'
  27. );
  28. case DataCategory.SPANS:
  29. return t(
  30. 'Tracing is enabled by spans. A span represents a single operation of work within a trace'
  31. );
  32. default:
  33. return null;
  34. }
  35. }