platformCategories.tsx 7.9 KB

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