platformCategories.tsx 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. import type {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-echo',
  61. 'go-fasthttp',
  62. 'go-gin',
  63. 'go-http',
  64. 'go-iris',
  65. 'go-martini',
  66. 'go-negroni',
  67. 'java',
  68. 'java-appengine',
  69. 'java-log4j',
  70. 'java-log4j2',
  71. 'java-logback',
  72. 'java-logging',
  73. 'java-spring',
  74. 'java-spring-boot',
  75. 'kotlin',
  76. 'native',
  77. 'node',
  78. 'node-express',
  79. 'node-koa',
  80. 'node-connect',
  81. 'perl',
  82. 'php',
  83. 'php-laravel',
  84. 'php-monolog',
  85. 'php-symfony',
  86. 'python',
  87. 'python-aiohttp',
  88. 'python-asgi',
  89. 'python-bottle',
  90. 'python-celery',
  91. 'python-chalice',
  92. 'python-django',
  93. 'python-falcon',
  94. 'python-fastapi',
  95. 'python-flask',
  96. 'python-pylons',
  97. 'python-pymongo',
  98. 'python-pyramid',
  99. 'python-quart',
  100. 'python-rq',
  101. 'python-sanic',
  102. 'python-starlette',
  103. 'python-tornado',
  104. 'python-tryton',
  105. 'python-wsgi',
  106. 'ruby',
  107. 'ruby-rails',
  108. 'ruby-rack',
  109. 'rust',
  110. ];
  111. // Mirrors `SERVERLESS` in src/sentry/utils/platform_categories.py
  112. // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
  113. export const serverless: PlatformKey[] = [
  114. 'dotnet-awslambda',
  115. 'dotnet-gcpfunctions',
  116. 'node-awslambda',
  117. 'node-azurefunctions',
  118. 'node-gcpfunctions',
  119. 'python-awslambda',
  120. 'python-azurefunctions',
  121. 'python-gcpfunctions',
  122. 'python-serverless',
  123. ];
  124. // Mirrors `DESKTOP` in src/sentry/utils/platform_categories.py
  125. // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
  126. export const desktop: PlatformKey[] = [
  127. 'apple-macos',
  128. 'dotnet-maui',
  129. 'dotnet-winforms',
  130. 'dotnet-wpf',
  131. 'dotnet',
  132. 'electron',
  133. 'flutter',
  134. 'java',
  135. 'javascript-electron',
  136. 'kotlin',
  137. 'minidump',
  138. 'native',
  139. 'native-breakpad',
  140. 'native-crashpad',
  141. 'native-minidump',
  142. 'native-qt',
  143. 'unity',
  144. 'unreal',
  145. ];
  146. export const sourceMaps: PlatformKey[] = [
  147. ...frontend,
  148. 'react-native',
  149. 'cordova',
  150. 'electron',
  151. ];
  152. export const performance: PlatformKey[] = [
  153. 'bun',
  154. 'javascript',
  155. 'javascript-ember',
  156. 'javascript-react',
  157. 'javascript-vue',
  158. 'php',
  159. 'php-laravel',
  160. 'python',
  161. 'python-django',
  162. 'python-flask',
  163. 'python-fastapi',
  164. 'python-starlette',
  165. 'python-sanic',
  166. 'python-celery',
  167. 'python-bottle',
  168. 'python-pylons',
  169. 'python-pyramid',
  170. 'python-tornado',
  171. 'python-rq',
  172. 'node',
  173. 'node-express',
  174. 'node-koa',
  175. 'node-connect',
  176. ];
  177. // List of platforms that have performance onboarding checklist content
  178. export const withPerformanceOnboarding: Set<PlatformKey> = new Set([
  179. 'javascript',
  180. 'javascript-react',
  181. ]);
  182. // List of platforms that do not have performance support. We make use of this list in the product to not provide any Performance
  183. // views such as Performance onboarding checklist.
  184. export const withoutPerformanceSupport: Set<PlatformKey> = new Set([
  185. 'elixir',
  186. 'minidump',
  187. ]);
  188. export const profiling: PlatformKey[] = [
  189. // mobile
  190. 'android',
  191. 'apple-ios',
  192. // go
  193. 'go',
  194. // nodejs
  195. 'node',
  196. 'node-express',
  197. 'node-koa',
  198. 'node-connect',
  199. 'javascript-nextjs',
  200. 'javascript-remix',
  201. 'javascript-sveltekit',
  202. 'javascript',
  203. 'javascript-react',
  204. // react-native
  205. 'react-native',
  206. // python
  207. 'python',
  208. 'python-django',
  209. 'python-flask',
  210. 'python-fastapi',
  211. 'python-starlette',
  212. 'python-sanic',
  213. 'python-celery',
  214. 'python-bottle',
  215. 'python-pylons',
  216. 'python-pyramid',
  217. 'python-tornado',
  218. 'python-rq',
  219. 'python-aiohttp',
  220. 'python-chalice',
  221. 'python-falcon',
  222. 'python-quart',
  223. 'python-tryton',
  224. 'python-wsgi',
  225. 'python-serverless',
  226. // rust
  227. 'rust',
  228. // php
  229. 'php',
  230. 'php-laravel',
  231. 'php-symfony',
  232. // ruby
  233. 'ruby',
  234. 'ruby-rails',
  235. 'ruby-rack',
  236. ];
  237. export const releaseHealth: PlatformKey[] = [
  238. // frontend
  239. 'javascript',
  240. 'javascript-react',
  241. 'javascript-angular',
  242. 'javascript-angularjs',
  243. 'javascript-astro',
  244. 'javascript-backbone',
  245. 'javascript-ember',
  246. 'javascript-gatsby',
  247. 'javascript-vue',
  248. 'javascript-nextjs',
  249. 'javascript-remix',
  250. 'javascript-svelte',
  251. 'javascript-sveltekit',
  252. // mobile
  253. 'android',
  254. 'apple-ios',
  255. 'cordova',
  256. 'javascript-cordova',
  257. 'react-native',
  258. 'flutter',
  259. 'dart-flutter',
  260. // backend
  261. 'bun',
  262. 'native',
  263. 'node',
  264. 'node-express',
  265. 'node-koa',
  266. 'node-connect',
  267. 'python',
  268. 'python-django',
  269. 'python-flask',
  270. 'python-fastapi',
  271. 'python-starlette',
  272. 'python-sanic',
  273. 'python-celery',
  274. 'python-bottle',
  275. 'python-pylons',
  276. 'python-pyramid',
  277. 'python-tornado',
  278. 'python-rq',
  279. 'python-pymongo',
  280. 'rust',
  281. // serverless
  282. // desktop
  283. 'apple-macos',
  284. 'native',
  285. 'native-crashpad',
  286. 'native-breakpad',
  287. 'native-qt',
  288. 'electron',
  289. 'javascript-electron',
  290. ];
  291. // 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.
  292. export const replayBackendPlatforms: readonly PlatformKey[] = [
  293. 'bun',
  294. 'dotnet-aspnetcore',
  295. 'dotnet-aspnet',
  296. 'elixir',
  297. 'go-echo',
  298. 'go-fasthttp',
  299. 'go',
  300. 'go-gin',
  301. 'go-http',
  302. 'go-iris',
  303. 'go-martini',
  304. 'go-negroni',
  305. 'java-spring',
  306. 'java-spring-boot',
  307. 'node',
  308. 'node-express',
  309. 'php',
  310. 'php-laravel',
  311. 'php-symfony',
  312. 'python-aiohttp',
  313. 'python-bottle',
  314. 'python-django',
  315. 'python-falcon',
  316. 'python-fastapi',
  317. 'python-flask',
  318. 'python-pyramid',
  319. 'python-quart',
  320. 'python-sanic',
  321. 'python-starlette',
  322. 'python-tornado',
  323. 'ruby-rails',
  324. ];
  325. // These are the frontend platforms that can set up replay.
  326. export const replayFrontendPlatforms: readonly PlatformKey[] = [
  327. 'capacitor',
  328. 'electron',
  329. 'javascript-angular',
  330. 'javascript-astro',
  331. 'javascript-backbone',
  332. 'javascript-capacitor',
  333. 'javascript-electron',
  334. 'javascript-ember',
  335. 'javascript-gatsby',
  336. 'javascript-nextjs',
  337. 'javascript-react',
  338. 'javascript-remix',
  339. 'javascript-svelte',
  340. 'javascript-sveltekit',
  341. 'javascript-vue',
  342. 'javascript',
  343. ];
  344. // These are all the platforms that can set up replay.
  345. export const replayPlatforms: readonly PlatformKey[] = [
  346. ...replayFrontendPlatforms,
  347. ...replayBackendPlatforms,
  348. ];
  349. /**
  350. * The list of platforms for which we have created onboarding instructions.
  351. * Should be a subset of the list of `replayPlatforms`.
  352. * This should match sentry-docs: `/src/wizard/${platform}/replay-onboarding/${subPlatform}/`.
  353. * See: https://github.com/getsentry/sentry-docs/tree/master/src/wizard/javascript/replay-onboarding
  354. */
  355. export const replayOnboardingPlatforms: readonly PlatformKey[] = [
  356. ...replayFrontendPlatforms.filter(p => !['javascript-backbone'].includes(p)),
  357. ...replayBackendPlatforms,
  358. ];
  359. // These are the supported replay platforms that can also be set up using the JS loader.
  360. export const replayJsLoaderInstructionsPlatformList: readonly PlatformKey[] = [
  361. 'javascript',
  362. ...replayBackendPlatforms,
  363. ];
  364. const customMetricBackendPlatforms: readonly PlatformKey[] = [
  365. 'bun',
  366. 'dotnet',
  367. 'dotnet-aspnetcore',
  368. 'dotnet-awslambda',
  369. 'dotnet-gcpfunctions',
  370. 'dotnet-maui',
  371. 'dotnet-uwp',
  372. 'dotnet-winforms',
  373. 'dotnet-wpf',
  374. 'php',
  375. 'php-laravel',
  376. // TODO: Enable once metrics are available for Symfony
  377. // 'php-symfony',
  378. 'python',
  379. 'python-aiohttp',
  380. 'python-asgi',
  381. 'python-awslambda',
  382. 'python-bottle',
  383. 'python-celery',
  384. 'python-chalice',
  385. 'python-django',
  386. 'python-falcon',
  387. 'python-fastapi',
  388. 'python-flask',
  389. 'python-gcpfunctions',
  390. 'python-pymongo',
  391. 'python-pylons',
  392. 'python-pyramid',
  393. 'python-quart',
  394. 'python-rq',
  395. 'python-sanic',
  396. 'python-serverless',
  397. 'python-starlette',
  398. 'python-tornado',
  399. 'python-tryton',
  400. 'python-wsgi',
  401. 'rust',
  402. 'node',
  403. 'node-awslambda',
  404. 'node-azurefunctions',
  405. 'node-connect',
  406. 'node-express',
  407. 'node-gcpfunctions',
  408. 'node-koa',
  409. ];
  410. const customMetricFrontendPlatforms: readonly PlatformKey[] = [
  411. 'electron',
  412. 'javascript-angular',
  413. 'javascript-astro',
  414. 'javascript-backbone',
  415. 'javascript-capacitor',
  416. 'javascript-electron',
  417. 'javascript-ember',
  418. 'javascript-gatsby',
  419. 'javascript-nextjs',
  420. 'javascript-react',
  421. 'javascript-remix',
  422. 'javascript-svelte',
  423. 'javascript-sveltekit',
  424. 'javascript-vue',
  425. 'javascript',
  426. ];
  427. // These are all the platforms that can set up custom metrics.
  428. export const customMetricPlatforms: Set<PlatformKey> = new Set([
  429. ...customMetricFrontendPlatforms,
  430. ...customMetricBackendPlatforms,
  431. ]);
  432. /**
  433. * The list of platforms for which we have created onboarding instructions.
  434. * Should be a subset of the list of `customMetricPlatforms`.
  435. */
  436. export const customMetricOnboardingPlatforms = new Set(
  437. [...customMetricPlatforms].filter(
  438. p =>
  439. // Legacy platforms that do not have in-product docs
  440. ![
  441. 'javascript-backbone',
  442. 'javascript-capacitor',
  443. 'javascript-electron',
  444. 'python-pylons',
  445. 'python-tryton',
  446. ].includes(p)
  447. )
  448. );