settings.ts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. import {t} from 'sentry/locale';
  2. import {
  3. DATA_TYPE as RESOURCE_DATA_TYPE,
  4. DATA_TYPE_PLURAL as RESOURCE_DATA_TYPE_PLURAL,
  5. MODULE_TITLE as RESOURCES_MODULE_TITLE,
  6. } from 'sentry/views/insights/browser/resources/settings';
  7. import {
  8. DATA_TYPE as WEB_VITALS_DATA_TYPE,
  9. DATA_TYPE_PLURAL as WEB_VITALS_DATA_TYPE_PLURAL,
  10. MODULE_TITLE as VITALS_MODULE_TITLE,
  11. } from 'sentry/views/insights/browser/webVitals/settings';
  12. import {
  13. DATA_TYPE as CACHE_DATA_TYPE,
  14. DATA_TYPE_PLURAL as CACHE_DATA_TYPE_PLURAL,
  15. MODULE_DOC_LINK as CACHE_MODULE_DOC_LINK,
  16. MODULE_TITLE as CACHE_MODULE_TITLE,
  17. } from 'sentry/views/insights/cache/settings';
  18. import {
  19. DATA_TYPE as DB_DATA_TYPE,
  20. DATA_TYPE_PLURAL as DB_DATA_TYPE_PLURAL,
  21. MODULE_TITLE as DB_MODULE_TITLE,
  22. } from 'sentry/views/insights/database/settings';
  23. import {
  24. DATA_TYPE as HTTP_DATA_TYPE,
  25. DATA_TYPE_PLURAL as HTTP_DATA_TYPE_PLURAL,
  26. MODULE_TITLE as HTTP_MODULE_TITLE,
  27. } from 'sentry/views/insights/http/settings';
  28. import {
  29. DATA_TYPE as AI_DATA_TYPE,
  30. DATA_TYPE_PLURAL as AI_DATA_TYPE_PLURAL,
  31. MODULE_TITLE as AI_MODULE_TITLE,
  32. } from 'sentry/views/insights/llmMonitoring/settings';
  33. import {
  34. DATA_TYPE as APP_STARTS_DATA_TYPE,
  35. DATA_TYPE_PLURAL as APP_STARTS_DATA_TYPE_PLURAL,
  36. MODULE_TITLE as APP_STARTS_MODULE_TITLE,
  37. } from 'sentry/views/insights/mobile/appStarts/settings';
  38. import {
  39. DATA_TYPE as SCREEN_LOAD_DATA_TYPE,
  40. DATA_TYPE_PLURAL as SCREEN_LOAD_DATA_TYPE_PLURAL,
  41. MODULE_TITLE as SCREEN_LOADS_MODULE_TITLE,
  42. } from 'sentry/views/insights/mobile/screenload/settings';
  43. import {MODULE_TITLE as MOBILE_UI_MODULE_TITLE} from 'sentry/views/insights/mobile/ui/settings';
  44. import {
  45. DATA_TYPE as QUEUE_DATA_TYPE,
  46. DATA_TYPE_PLURAL as QUEUE_DATA_TYPE_PLURAL,
  47. MODULE_DOC_LINK as QUEUE_MODULE_DOC_LINK,
  48. MODULE_TITLE as QUEUE_MODULE_TITLE,
  49. } from 'sentry/views/insights/queues/settings';
  50. import {ModuleName} from 'sentry/views/insights/types';
  51. export const INSIGHTS_TITLE = t('Insights');
  52. export const INSIGHTS_BASE_URL = 'insights';
  53. export const DEFAULT_INTERVAL = '10m';
  54. export const MODULE_TITLES: Record<ModuleName, string> = {
  55. [ModuleName.DB]: DB_MODULE_TITLE,
  56. [ModuleName.HTTP]: HTTP_MODULE_TITLE,
  57. [ModuleName.CACHE]: CACHE_MODULE_TITLE,
  58. [ModuleName.QUEUE]: QUEUE_MODULE_TITLE,
  59. [ModuleName.SCREEN_LOAD]: SCREEN_LOADS_MODULE_TITLE,
  60. [ModuleName.APP_START]: APP_STARTS_MODULE_TITLE,
  61. [ModuleName.VITAL]: VITALS_MODULE_TITLE,
  62. [ModuleName.RESOURCE]: RESOURCES_MODULE_TITLE,
  63. [ModuleName.AI]: AI_MODULE_TITLE,
  64. [ModuleName.MOBILE_UI]: MOBILE_UI_MODULE_TITLE,
  65. [ModuleName.OTHER]: '',
  66. [ModuleName.ALL]: '',
  67. };
  68. export const MODULE_DATA_TYPES: Record<ModuleName, string> = {
  69. [ModuleName.DB]: DB_DATA_TYPE,
  70. [ModuleName.HTTP]: HTTP_DATA_TYPE,
  71. [ModuleName.CACHE]: CACHE_DATA_TYPE,
  72. [ModuleName.QUEUE]: QUEUE_DATA_TYPE,
  73. [ModuleName.SCREEN_LOAD]: SCREEN_LOAD_DATA_TYPE,
  74. [ModuleName.APP_START]: APP_STARTS_DATA_TYPE,
  75. [ModuleName.VITAL]: WEB_VITALS_DATA_TYPE,
  76. [ModuleName.RESOURCE]: RESOURCE_DATA_TYPE,
  77. [ModuleName.AI]: AI_DATA_TYPE,
  78. [ModuleName.MOBILE_UI]: t('Mobile UI'),
  79. [ModuleName.OTHER]: '',
  80. [ModuleName.ALL]: '',
  81. };
  82. export const MODULE_DATA_TYPES_PLURAL: Record<ModuleName, string> = {
  83. [ModuleName.DB]: DB_DATA_TYPE_PLURAL,
  84. [ModuleName.HTTP]: HTTP_DATA_TYPE_PLURAL,
  85. [ModuleName.CACHE]: CACHE_DATA_TYPE_PLURAL,
  86. [ModuleName.QUEUE]: QUEUE_DATA_TYPE_PLURAL,
  87. [ModuleName.SCREEN_LOAD]: SCREEN_LOAD_DATA_TYPE_PLURAL,
  88. [ModuleName.APP_START]: APP_STARTS_DATA_TYPE_PLURAL,
  89. [ModuleName.VITAL]: WEB_VITALS_DATA_TYPE_PLURAL,
  90. [ModuleName.RESOURCE]: RESOURCE_DATA_TYPE_PLURAL,
  91. [ModuleName.AI]: AI_DATA_TYPE_PLURAL,
  92. [ModuleName.MOBILE_UI]: t('Mobile UI'),
  93. [ModuleName.OTHER]: '',
  94. [ModuleName.ALL]: '',
  95. };
  96. export const MODULE_PRODUCT_DOC_LINKS: Record<ModuleName, string> = {
  97. [ModuleName.DB]: 'https://docs.sentry.io/product/insights/database/',
  98. [ModuleName.HTTP]: 'https://docs.sentry.io/product/insights/http/',
  99. [ModuleName.CACHE]: CACHE_MODULE_DOC_LINK,
  100. [ModuleName.QUEUE]: QUEUE_MODULE_DOC_LINK,
  101. [ModuleName.SCREEN_LOAD]:
  102. 'https://docs.sentry.io/product/insights/mobile-vitals/screen-loads/',
  103. [ModuleName.APP_START]:
  104. 'https://docs.sentry.io/product/insights/mobile-vitals/app-starts/',
  105. [ModuleName.VITAL]: 'https://docs.sentry.io/product/insights/web-vitals/',
  106. [ModuleName.RESOURCE]: 'https://docs.sentry.io/product/insights/assets/',
  107. [ModuleName.AI]: 'https://docs.sentry.io/product/insights/llm-monitoring/',
  108. [ModuleName.MOBILE_UI]: 'https://docs.sentry.io/product/insights/mobile-vitals/ui/',
  109. [ModuleName.OTHER]: '',
  110. [ModuleName.ALL]: '',
  111. };