settings.ts 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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_DOC_LINK as RESOURCES_MODULE_DOC_LINK,
  6. MODULE_TITLE as RESOURCES_MODULE_TITLE,
  7. } from 'sentry/views/insights/browser/resources/settings';
  8. import {
  9. DATA_TYPE as WEB_VITALS_DATA_TYPE,
  10. DATA_TYPE_PLURAL as WEB_VITALS_DATA_TYPE_PLURAL,
  11. MODULE_DOC_LINK as VITALS_MODULE_DOC_LINK,
  12. MODULE_TITLE as VITALS_MODULE_TITLE,
  13. } from 'sentry/views/insights/browser/webVitals/settings';
  14. import {
  15. DATA_TYPE as CACHE_DATA_TYPE,
  16. DATA_TYPE_PLURAL as CACHE_DATA_TYPE_PLURAL,
  17. MODULE_DOC_LINK as CACHE_MODULE_DOC_LINK,
  18. MODULE_TITLE as CACHE_MODULE_TITLE,
  19. } from 'sentry/views/insights/cache/settings';
  20. import {
  21. DATA_TYPE as DB_DATA_TYPE,
  22. DATA_TYPE_PLURAL as DB_DATA_TYPE_PLURAL,
  23. MODULE_DOC_LINK as DB_MODULE_DOC_LINK,
  24. MODULE_TITLE as DB_MODULE_TITLE,
  25. } from 'sentry/views/insights/database/settings';
  26. import {
  27. DATA_TYPE as HTTP_DATA_TYPE,
  28. DATA_TYPE_PLURAL as HTTP_DATA_TYPE_PLURAL,
  29. MODULE_DOC_LINK as HTTP_MODULE_DOC_LINK,
  30. MODULE_TITLE as HTTP_MODULE_TITLE,
  31. } from 'sentry/views/insights/http/settings';
  32. import {
  33. DATA_TYPE as AI_DATA_TYPE,
  34. DATA_TYPE_PLURAL as AI_DATA_TYPE_PLURAL,
  35. MODULE_DOC_LINK as AI_MODULE_DOC_LINK,
  36. MODULE_TITLE as AI_MODULE_TITLE,
  37. } from 'sentry/views/insights/llmMonitoring/settings';
  38. import {
  39. DATA_TYPE as APP_STARTS_DATA_TYPE,
  40. DATA_TYPE_PLURAL as APP_STARTS_DATA_TYPE_PLURAL,
  41. MODULE_DOC_LINK as APP_STARTS_MODULE_DOC_LINK,
  42. MODULE_TITLE as APP_STARTS_MODULE_TITLE,
  43. } from 'sentry/views/insights/mobile/appStarts/settings';
  44. import {
  45. DATA_TYPE as SCREEN_LOAD_DATA_TYPE,
  46. DATA_TYPE_PLURAL as SCREEN_LOAD_DATA_TYPE_PLURAL,
  47. MODULE_DOC_LINK as SCREEN_LOADS_MODULE_DOC_LINK,
  48. MODULE_TITLE as SCREEN_LOADS_MODULE_TITLE,
  49. } from 'sentry/views/insights/mobile/screenload/settings';
  50. import {
  51. DATA_TYPE as MOBILE_SCREENS_DATA_TYPE,
  52. DATA_TYPE_PLURAL as MOBILE_SCREENS_DATA_TYPE_PLURAL,
  53. MODULE_DOC_LINK as MODULE_SCREENS_DOC_LINK,
  54. MODULE_TITLE as MOBILE_SCREENS_MODULE_TITLE,
  55. } from 'sentry/views/insights/mobile/screens/settings';
  56. import {
  57. MODULE_DOC_LINK as MODULE_UI_DOC_LINK,
  58. MODULE_TITLE as MOBILE_UI_MODULE_TITLE,
  59. } from 'sentry/views/insights/mobile/ui/settings';
  60. import {
  61. DATA_TYPE as QUEUE_DATA_TYPE,
  62. DATA_TYPE_PLURAL as QUEUE_DATA_TYPE_PLURAL,
  63. MODULE_DOC_LINK as QUEUE_MODULE_DOC_LINK,
  64. MODULE_TITLE as QUEUE_MODULE_TITLE,
  65. } from 'sentry/views/insights/queues/settings';
  66. import {ModuleName} from 'sentry/views/insights/types';
  67. export const INSIGHTS_TITLE = t('Insights');
  68. export const INSIGHTS_BASE_URL = 'insights';
  69. export const DEFAULT_INTERVAL = '10m';
  70. export const MODULE_TITLES: Record<ModuleName, string> = {
  71. [ModuleName.DB]: DB_MODULE_TITLE,
  72. [ModuleName.HTTP]: HTTP_MODULE_TITLE,
  73. [ModuleName.CACHE]: CACHE_MODULE_TITLE,
  74. [ModuleName.QUEUE]: QUEUE_MODULE_TITLE,
  75. [ModuleName.SCREEN_LOAD]: SCREEN_LOADS_MODULE_TITLE,
  76. [ModuleName.APP_START]: APP_STARTS_MODULE_TITLE,
  77. [ModuleName.VITAL]: VITALS_MODULE_TITLE,
  78. [ModuleName.RESOURCE]: RESOURCES_MODULE_TITLE,
  79. [ModuleName.AI]: AI_MODULE_TITLE,
  80. [ModuleName.MOBILE_UI]: MOBILE_UI_MODULE_TITLE,
  81. [ModuleName.MOBILE_SCREENS]: MOBILE_SCREENS_MODULE_TITLE,
  82. [ModuleName.OTHER]: '',
  83. };
  84. export const MODULE_DATA_TYPES: Record<ModuleName, string> = {
  85. [ModuleName.DB]: DB_DATA_TYPE,
  86. [ModuleName.HTTP]: HTTP_DATA_TYPE,
  87. [ModuleName.CACHE]: CACHE_DATA_TYPE,
  88. [ModuleName.QUEUE]: QUEUE_DATA_TYPE,
  89. [ModuleName.SCREEN_LOAD]: SCREEN_LOAD_DATA_TYPE,
  90. [ModuleName.APP_START]: APP_STARTS_DATA_TYPE,
  91. [ModuleName.VITAL]: WEB_VITALS_DATA_TYPE,
  92. [ModuleName.RESOURCE]: RESOURCE_DATA_TYPE,
  93. [ModuleName.AI]: AI_DATA_TYPE,
  94. [ModuleName.MOBILE_UI]: t('Mobile UI'),
  95. [ModuleName.MOBILE_SCREENS]: MOBILE_SCREENS_DATA_TYPE,
  96. [ModuleName.OTHER]: '',
  97. };
  98. export const MODULE_DATA_TYPES_PLURAL: Record<ModuleName, string> = {
  99. [ModuleName.DB]: DB_DATA_TYPE_PLURAL,
  100. [ModuleName.HTTP]: HTTP_DATA_TYPE_PLURAL,
  101. [ModuleName.CACHE]: CACHE_DATA_TYPE_PLURAL,
  102. [ModuleName.QUEUE]: QUEUE_DATA_TYPE_PLURAL,
  103. [ModuleName.SCREEN_LOAD]: SCREEN_LOAD_DATA_TYPE_PLURAL,
  104. [ModuleName.APP_START]: APP_STARTS_DATA_TYPE_PLURAL,
  105. [ModuleName.VITAL]: WEB_VITALS_DATA_TYPE_PLURAL,
  106. [ModuleName.RESOURCE]: RESOURCE_DATA_TYPE_PLURAL,
  107. [ModuleName.AI]: AI_DATA_TYPE_PLURAL,
  108. [ModuleName.MOBILE_UI]: t('Mobile UI'),
  109. [ModuleName.MOBILE_SCREENS]: MOBILE_SCREENS_DATA_TYPE_PLURAL,
  110. [ModuleName.OTHER]: '',
  111. };
  112. export const MODULE_PRODUCT_DOC_LINKS: Record<ModuleName, string> = {
  113. [ModuleName.DB]: DB_MODULE_DOC_LINK,
  114. [ModuleName.HTTP]: HTTP_MODULE_DOC_LINK,
  115. [ModuleName.CACHE]: CACHE_MODULE_DOC_LINK,
  116. [ModuleName.QUEUE]: QUEUE_MODULE_DOC_LINK,
  117. [ModuleName.SCREEN_LOAD]: SCREEN_LOADS_MODULE_DOC_LINK,
  118. [ModuleName.APP_START]: APP_STARTS_MODULE_DOC_LINK,
  119. [ModuleName.VITAL]: VITALS_MODULE_DOC_LINK,
  120. [ModuleName.RESOURCE]: RESOURCES_MODULE_DOC_LINK,
  121. [ModuleName.AI]: AI_MODULE_DOC_LINK,
  122. [ModuleName.MOBILE_UI]: MODULE_UI_DOC_LINK,
  123. [ModuleName.MOBILE_SCREENS]: MODULE_SCREENS_DOC_LINK,
  124. [ModuleName.OTHER]: '',
  125. };