settings.ts 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. MODULE_DOC_LINK as MODULE_MODULE_DOC_LINK,
  52. MODULE_TITLE as MOBILE_UI_MODULE_TITLE,
  53. } from 'sentry/views/insights/mobile/ui/settings';
  54. import {
  55. DATA_TYPE as QUEUE_DATA_TYPE,
  56. DATA_TYPE_PLURAL as QUEUE_DATA_TYPE_PLURAL,
  57. MODULE_DOC_LINK as QUEUE_MODULE_DOC_LINK,
  58. MODULE_TITLE as QUEUE_MODULE_TITLE,
  59. } from 'sentry/views/insights/queues/settings';
  60. import {ModuleName} from 'sentry/views/insights/types';
  61. export const INSIGHTS_TITLE = t('Insights');
  62. export const INSIGHTS_BASE_URL = 'insights';
  63. export const DEFAULT_INTERVAL = '10m';
  64. export const MODULE_TITLES: Record<ModuleName, string> = {
  65. [ModuleName.DB]: DB_MODULE_TITLE,
  66. [ModuleName.HTTP]: HTTP_MODULE_TITLE,
  67. [ModuleName.CACHE]: CACHE_MODULE_TITLE,
  68. [ModuleName.QUEUE]: QUEUE_MODULE_TITLE,
  69. [ModuleName.SCREEN_LOAD]: SCREEN_LOADS_MODULE_TITLE,
  70. [ModuleName.APP_START]: APP_STARTS_MODULE_TITLE,
  71. [ModuleName.VITAL]: VITALS_MODULE_TITLE,
  72. [ModuleName.RESOURCE]: RESOURCES_MODULE_TITLE,
  73. [ModuleName.AI]: AI_MODULE_TITLE,
  74. [ModuleName.MOBILE_UI]: MOBILE_UI_MODULE_TITLE,
  75. [ModuleName.OTHER]: '',
  76. [ModuleName.ALL]: '',
  77. };
  78. export const MODULE_DATA_TYPES: Record<ModuleName, string> = {
  79. [ModuleName.DB]: DB_DATA_TYPE,
  80. [ModuleName.HTTP]: HTTP_DATA_TYPE,
  81. [ModuleName.CACHE]: CACHE_DATA_TYPE,
  82. [ModuleName.QUEUE]: QUEUE_DATA_TYPE,
  83. [ModuleName.SCREEN_LOAD]: SCREEN_LOAD_DATA_TYPE,
  84. [ModuleName.APP_START]: APP_STARTS_DATA_TYPE,
  85. [ModuleName.VITAL]: WEB_VITALS_DATA_TYPE,
  86. [ModuleName.RESOURCE]: RESOURCE_DATA_TYPE,
  87. [ModuleName.AI]: AI_DATA_TYPE,
  88. [ModuleName.MOBILE_UI]: t('Mobile UI'),
  89. [ModuleName.OTHER]: '',
  90. [ModuleName.ALL]: '',
  91. };
  92. export const MODULE_DATA_TYPES_PLURAL: Record<ModuleName, string> = {
  93. [ModuleName.DB]: DB_DATA_TYPE_PLURAL,
  94. [ModuleName.HTTP]: HTTP_DATA_TYPE_PLURAL,
  95. [ModuleName.CACHE]: CACHE_DATA_TYPE_PLURAL,
  96. [ModuleName.QUEUE]: QUEUE_DATA_TYPE_PLURAL,
  97. [ModuleName.SCREEN_LOAD]: SCREEN_LOAD_DATA_TYPE_PLURAL,
  98. [ModuleName.APP_START]: APP_STARTS_DATA_TYPE_PLURAL,
  99. [ModuleName.VITAL]: WEB_VITALS_DATA_TYPE_PLURAL,
  100. [ModuleName.RESOURCE]: RESOURCE_DATA_TYPE_PLURAL,
  101. [ModuleName.AI]: AI_DATA_TYPE_PLURAL,
  102. [ModuleName.MOBILE_UI]: t('Mobile UI'),
  103. [ModuleName.OTHER]: '',
  104. [ModuleName.ALL]: '',
  105. };
  106. export const MODULE_PRODUCT_DOC_LINKS: Record<ModuleName, string> = {
  107. [ModuleName.DB]: DB_MODULE_DOC_LINK,
  108. [ModuleName.HTTP]: HTTP_MODULE_DOC_LINK,
  109. [ModuleName.CACHE]: CACHE_MODULE_DOC_LINK,
  110. [ModuleName.QUEUE]: QUEUE_MODULE_DOC_LINK,
  111. [ModuleName.SCREEN_LOAD]: SCREEN_LOADS_MODULE_DOC_LINK,
  112. [ModuleName.APP_START]: APP_STARTS_MODULE_DOC_LINK,
  113. [ModuleName.VITAL]: VITALS_MODULE_DOC_LINK,
  114. [ModuleName.RESOURCE]: RESOURCES_MODULE_DOC_LINK,
  115. [ModuleName.AI]: AI_MODULE_DOC_LINK,
  116. [ModuleName.MOBILE_UI]: MODULE_MODULE_DOC_LINK,
  117. [ModuleName.OTHER]: '',
  118. [ModuleName.ALL]: '',
  119. };