platformCategories.tsx 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. import {PlatformKey} from 'sentry/types';
  2. export enum PlatformCategory {
  3. FRONTEND,
  4. MOBILE,
  5. BACKEND,
  6. SERVERLESS,
  7. DESKTOP,
  8. OTHER,
  9. }
  10. // Mirrors `FRONTEND` in src/sentry/utils/platform_categories.py
  11. // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
  12. export const frontend: PlatformKey[] = [
  13. 'dart',
  14. 'javascript',
  15. 'javascript-angular',
  16. 'javascript-angularjs',
  17. 'javascript-astro',
  18. 'javascript-backbone',
  19. 'javascript-ember',
  20. 'javascript-gatsby',
  21. 'javascript-nextjs',
  22. 'javascript-react',
  23. 'javascript-remix',
  24. 'javascript-svelte',
  25. 'javascript-sveltekit',
  26. 'javascript-vue',
  27. 'unity',
  28. ];
  29. // Mirrors `MOBILE` in src/sentry/utils/platform_categories.py
  30. // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
  31. export const mobile: PlatformKey[] = [
  32. 'android',
  33. 'apple-ios',
  34. 'capacitor',
  35. 'cordova',
  36. 'dart-flutter',
  37. 'dotnet-maui',
  38. 'dotnet-xamarin',
  39. 'flutter',
  40. 'ionic',
  41. 'javascript-capacitor',
  42. 'javascript-cordova',
  43. 'react-native',
  44. 'unity',
  45. 'unreal',
  46. // Old platforms
  47. 'java-android',
  48. 'cocoa-objc',
  49. 'cocoa-swift',
  50. ];
  51. // Mirrors `BACKEND` in src/sentry/utils/platform_categories.py
  52. // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
  53. export const backend: PlatformKey[] = [
  54. 'bun',
  55. 'dotnet',
  56. 'dotnet-aspnetcore',
  57. 'dotnet-aspnet',
  58. 'elixir',
  59. 'go',
  60. 'go-http',
  61. 'java',
  62. 'java-appengine',
  63. 'java-log4j',
  64. 'java-log4j2',
  65. 'java-logback',
  66. 'java-logging',
  67. 'java-spring',
  68. 'java-spring-boot',
  69. 'kotlin',
  70. 'native',
  71. 'node',
  72. 'node-express',
  73. 'node-koa',
  74. 'node-connect',
  75. 'perl',
  76. 'php',
  77. 'php-laravel',
  78. 'php-monolog',
  79. 'php-symfony',
  80. 'python',
  81. 'python-aiohttp',
  82. 'python-asgi',
  83. 'python-bottle',
  84. 'python-celery',
  85. 'python-chalice',
  86. 'python-django',
  87. 'python-falcon',
  88. 'python-fastapi',
  89. 'python-flask',
  90. 'python-pylons',
  91. 'python-pymongo',
  92. 'python-pyramid',
  93. 'python-quart',
  94. 'python-rq',
  95. 'python-sanic',
  96. 'python-starlette',
  97. 'python-tornado',
  98. 'python-tryton',
  99. 'python-wsgi',
  100. 'ruby',
  101. 'ruby-rails',
  102. 'ruby-rack',
  103. 'rust',
  104. ];
  105. // Mirrors `SERVERLESS` in src/sentry/utils/platform_categories.py
  106. // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
  107. export const serverless: PlatformKey[] = [
  108. 'dotnet-awslambda',
  109. 'dotnet-gcpfunctions',
  110. 'node-awslambda',
  111. 'node-azurefunctions',
  112. 'node-gcpfunctions',
  113. 'python-awslambda',
  114. 'python-azurefunctions',
  115. 'python-gcpfunctions',
  116. 'python-serverless',
  117. ];
  118. // Mirrors `DESKTOP` in src/sentry/utils/platform_categories.py
  119. // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
  120. export const desktop: PlatformKey[] = [
  121. 'apple-macos',
  122. 'dotnet-maui',
  123. 'dotnet-winforms',
  124. 'dotnet-wpf',
  125. 'dotnet',
  126. 'electron',
  127. 'flutter',
  128. 'java',
  129. 'javascript-electron',
  130. 'kotlin',
  131. 'minidump',
  132. 'native',
  133. 'native-breakpad',
  134. 'native-crashpad',
  135. 'native-minidump',
  136. 'native-qt',
  137. 'unity',
  138. 'unreal',
  139. ];
  140. export const sourceMaps: PlatformKey[] = [
  141. ...frontend,
  142. 'react-native',
  143. 'cordova',
  144. 'electron',
  145. ];
  146. export const performance: PlatformKey[] = [
  147. 'bun',
  148. 'javascript',
  149. 'javascript-ember',
  150. 'javascript-react',
  151. 'javascript-vue',
  152. 'php',
  153. 'php-laravel',
  154. 'python',
  155. 'python-django',
  156. 'python-flask',
  157. 'python-fastapi',
  158. 'python-starlette',
  159. 'python-sanic',
  160. 'python-celery',
  161. 'python-bottle',
  162. 'python-pylons',
  163. 'python-pyramid',
  164. 'python-tornado',
  165. 'python-rq',
  166. 'node',
  167. 'node-express',
  168. 'node-koa',
  169. 'node-connect',
  170. ];
  171. // List of platforms that have performance onboarding checklist content
  172. export const withPerformanceOnboarding: Set<PlatformKey> = new Set([
  173. 'javascript',
  174. 'javascript-react',
  175. ]);
  176. // List of platforms that do not have performance support. We make use of this list in the product to not provide any Performance
  177. // views such as Performance onboarding checklist.
  178. export const withoutPerformanceSupport: Set<PlatformKey> = new Set([
  179. 'elixir',
  180. 'minidump',
  181. ]);
  182. export const profiling: PlatformKey[] = [
  183. // mobile
  184. 'android',
  185. 'apple-ios',
  186. // go
  187. 'go',
  188. // nodejs
  189. 'node',
  190. 'node-express',
  191. 'node-koa',
  192. 'node-connect',
  193. 'javascript-nextjs',
  194. 'javascript-remix',
  195. 'javascript-sveltekit',
  196. 'javascript',
  197. 'javascript-react',
  198. // react-native
  199. 'react-native',
  200. // python
  201. 'python',
  202. 'python-django',
  203. 'python-flask',
  204. 'python-fastapi',
  205. 'python-starlette',
  206. 'python-sanic',
  207. 'python-celery',
  208. 'python-bottle',
  209. 'python-pylons',
  210. 'python-pyramid',
  211. 'python-tornado',
  212. 'python-rq',
  213. 'python-aiohttp',
  214. 'python-chalice',
  215. 'python-falcon',
  216. 'python-quart',
  217. 'python-tryton',
  218. 'python-wsgi',
  219. 'python-serverless',
  220. // rust
  221. 'rust',
  222. // php
  223. 'php',
  224. 'php-laravel',
  225. 'php-symfony',
  226. // ruby
  227. 'ruby',
  228. 'ruby-rails',
  229. 'ruby-rack',
  230. ];
  231. export const releaseHealth: PlatformKey[] = [
  232. // frontend
  233. 'javascript',
  234. 'javascript-react',
  235. 'javascript-angular',
  236. 'javascript-angularjs',
  237. 'javascript-astro',
  238. 'javascript-backbone',
  239. 'javascript-ember',
  240. 'javascript-gatsby',
  241. 'javascript-vue',
  242. 'javascript-nextjs',
  243. 'javascript-remix',
  244. 'javascript-svelte',
  245. 'javascript-sveltekit',
  246. // mobile
  247. 'android',
  248. 'apple-ios',
  249. 'cordova',
  250. 'javascript-cordova',
  251. 'react-native',
  252. 'flutter',
  253. 'dart-flutter',
  254. // backend
  255. 'bun',
  256. 'native',
  257. 'node',
  258. 'node-express',
  259. 'node-koa',
  260. 'node-connect',
  261. 'python',
  262. 'python-django',
  263. 'python-flask',
  264. 'python-fastapi',
  265. 'python-starlette',
  266. 'python-sanic',
  267. 'python-celery',
  268. 'python-bottle',
  269. 'python-pylons',
  270. 'python-pyramid',
  271. 'python-tornado',
  272. 'python-rq',
  273. 'python-pymongo',
  274. 'rust',
  275. // serverless
  276. // desktop
  277. 'apple-macos',
  278. 'native',
  279. 'native-crashpad',
  280. 'native-breakpad',
  281. 'native-qt',
  282. ];
  283. // These are the backend platforms that can set up replay -- e.g. they can be set up via a linked JS framework or via JS loader.
  284. // Note: not currently comprehensive -- only included ones that are also in the `backend` platforms listed above
  285. // TODO: add all the platforms
  286. const replayBackendPlatforms: readonly PlatformKey[] = [
  287. 'bun',
  288. 'dotnet-aspnetcore',
  289. 'dotnet-aspnet',
  290. 'elixir',
  291. 'java-spring',
  292. 'java-spring-boot',
  293. 'node',
  294. 'node-express',
  295. 'php',
  296. 'php-laravel',
  297. 'php-symfony',
  298. 'python-aiohttp',
  299. 'python-bottle',
  300. 'python-django',
  301. 'python-falcon',
  302. 'python-fastapi',
  303. 'python-flask',
  304. 'python-pyramid',
  305. 'python-quart',
  306. 'python-sanic',
  307. 'python-starlette',
  308. 'python-tornado',
  309. 'ruby-rails',
  310. ];
  311. // These are the frontend platforms that can set up replay.
  312. const replayFrontendPlatforms: readonly PlatformKey[] = [
  313. 'capacitor',
  314. 'electron',
  315. 'javascript-angular',
  316. 'javascript-astro',
  317. 'javascript-backbone',
  318. 'javascript-capacitor',
  319. 'javascript-electron',
  320. 'javascript-ember',
  321. 'javascript-gatsby',
  322. 'javascript-nextjs',
  323. 'javascript-react',
  324. 'javascript-remix',
  325. 'javascript-svelte',
  326. 'javascript-sveltekit',
  327. 'javascript-vue',
  328. 'javascript',
  329. ];
  330. // These are all the platforms that can set up replay.
  331. export const replayPlatforms: readonly PlatformKey[] = [
  332. ...replayFrontendPlatforms,
  333. ...replayBackendPlatforms,
  334. ];
  335. /**
  336. * The list of platforms for which we have created onboarding instructions.
  337. * Should be a subset of the list of `replayPlatforms`.
  338. * This should match sentry-docs: `/src/wizard/${platform}/replay-onboarding/${subPlatform}/`.
  339. * See: https://github.com/getsentry/sentry-docs/tree/master/src/wizard/javascript/replay-onboarding
  340. */
  341. export const replayOnboardingPlatforms: readonly PlatformKey[] = [
  342. ...replayFrontendPlatforms.filter(p => !['javascript-backbone'].includes(p)),
  343. ...replayBackendPlatforms,
  344. ];
  345. // These are the supported replay platforms that can also be set up using the JS loader.
  346. export const replayJsLoaderInstructionsPlatformList: readonly PlatformKey[] = [
  347. 'javascript',
  348. ...replayBackendPlatforms,
  349. ];