platformCategories.tsx 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  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. 'dotnet',
  79. 'dotnet-aspnetcore',
  80. 'dotnet-aspnet',
  81. 'elixir',
  82. 'go',
  83. 'go-http',
  84. 'java',
  85. 'java-appengine',
  86. 'java-log4j',
  87. 'java-log4j2',
  88. 'java-logback',
  89. 'java-logging',
  90. 'java-spring',
  91. 'java-spring-boot',
  92. 'native',
  93. 'node',
  94. 'node-express',
  95. 'node-koa',
  96. 'node-connect',
  97. 'perl',
  98. 'php',
  99. 'php-laravel',
  100. 'php-monolog',
  101. 'php-symfony2',
  102. 'python',
  103. 'python-django',
  104. 'python-flask',
  105. 'python-fastapi',
  106. 'python-starlette',
  107. 'python-sanic',
  108. 'python-celery',
  109. 'python-aiohttp',
  110. 'python-chalice',
  111. 'python-falcon',
  112. 'python-quart',
  113. 'python-tryton',
  114. 'python-wsgi',
  115. 'python-bottle',
  116. 'python-pylons',
  117. 'python-pyramid',
  118. 'python-tornado',
  119. 'python-rq',
  120. 'python-pymongo',
  121. 'ruby',
  122. 'ruby-rails',
  123. 'ruby-rack',
  124. 'rust',
  125. 'kotlin',
  126. ] as const;
  127. export const serverless = [
  128. 'python-awslambda',
  129. 'python-azurefunctions',
  130. 'python-gcpfunctions',
  131. 'python-serverless',
  132. 'node-awslambda',
  133. 'node-azurefunctions',
  134. 'node-gcpfunctions',
  135. 'dotnet-awslambda',
  136. 'dotnet-gcpfunctions',
  137. ] as const;
  138. export const desktop = [
  139. 'apple-macos',
  140. 'dotnet',
  141. 'dotnet-winforms',
  142. 'dotnet-wpf',
  143. 'dotnet-maui',
  144. 'java',
  145. 'electron',
  146. 'javascript-electron',
  147. 'native',
  148. 'native-crashpad',
  149. 'native-breakpad',
  150. 'native-minidump',
  151. 'native-qt',
  152. 'minidump',
  153. 'unity',
  154. 'flutter',
  155. 'kotlin',
  156. 'unreal',
  157. ] as const;
  158. const categoryList = [
  159. {id: 'popular', name: t('Popular'), platforms: popularPlatformCategories},
  160. {id: 'browser', name: t('Browser'), platforms: frontend},
  161. {id: 'server', name: t('Server'), platforms: backend},
  162. {id: 'mobile', name: t('Mobile'), platforms: mobile},
  163. {id: 'desktop', name: t('Desktop'), platforms: desktop},
  164. {id: 'serverless', name: t('Serverless'), platforms: serverless},
  165. ] as const;
  166. export const deprecatedPlatforms = new Set(['node-serverlesscloud']);
  167. export const sourceMaps: PlatformKey[] = [
  168. ...frontend,
  169. 'react-native',
  170. 'cordova',
  171. 'electron',
  172. ];
  173. export const tracing = [
  174. 'python-tracing',
  175. 'node-tracing',
  176. 'react-native-tracing',
  177. ] as const;
  178. export const performance = [
  179. 'javascript',
  180. 'javascript-ember',
  181. 'javascript-react',
  182. 'javascript-vue',
  183. 'php',
  184. 'php-laravel',
  185. 'python',
  186. 'python-django',
  187. 'python-flask',
  188. 'python-fastapi',
  189. 'python-starlette',
  190. 'python-sanic',
  191. 'python-celery',
  192. 'python-bottle',
  193. 'python-pylons',
  194. 'python-pyramid',
  195. 'python-tornado',
  196. 'python-rq',
  197. 'node',
  198. 'node-express',
  199. 'node-koa',
  200. 'node-connect',
  201. ];
  202. // List of platforms that have performance onboarding checklist content
  203. export const withPerformanceOnboarding: Set<PlatformKey> = new Set([
  204. 'javascript',
  205. 'javascript-react',
  206. ]);
  207. // List of platforms that do not have performance support. We make use of this list in the product to not provide any Performance
  208. // views such as Performance onboarding checklist.
  209. export const withoutPerformanceSupport: Set<PlatformKey> = new Set([
  210. 'elixir',
  211. 'minidump',
  212. ]);
  213. export const profiling: PlatformKey[] = [
  214. // mobile
  215. 'android',
  216. 'apple-ios',
  217. // go
  218. 'go',
  219. // nodejs
  220. 'node',
  221. 'node-express',
  222. 'node-koa',
  223. 'node-connect',
  224. 'javascript-nextjs',
  225. 'javascript-remix',
  226. 'javascript-sveltekit',
  227. 'javascript',
  228. 'javascript-react',
  229. // react-native
  230. 'react-native',
  231. // python
  232. 'python',
  233. 'python-django',
  234. 'python-flask',
  235. 'python-fastapi',
  236. 'python-starlette',
  237. 'python-sanic',
  238. 'python-celery',
  239. 'python-bottle',
  240. 'python-pylons',
  241. 'python-pyramid',
  242. 'python-tornado',
  243. 'python-rq',
  244. 'python-aiohttp',
  245. 'python-chalice',
  246. 'python-falcon',
  247. 'python-quart',
  248. 'python-tryton',
  249. 'python-wsgi',
  250. 'python-serverless',
  251. // rust
  252. 'rust',
  253. // php
  254. 'php',
  255. 'php-laravel',
  256. 'php-symfony2',
  257. // ruby
  258. 'ruby',
  259. 'ruby-rails',
  260. 'ruby-rack',
  261. ];
  262. export const releaseHealth: PlatformKey[] = [
  263. // frontend
  264. 'javascript',
  265. 'javascript-react',
  266. 'javascript-angular',
  267. 'javascript-angularjs',
  268. 'javascript-backbone',
  269. 'javascript-ember',
  270. 'javascript-gatsby',
  271. 'javascript-vue',
  272. 'javascript-nextjs',
  273. 'javascript-remix',
  274. 'javascript-svelte',
  275. 'javascript-sveltekit',
  276. // mobile
  277. 'android',
  278. 'apple-ios',
  279. 'cordova',
  280. 'javascript-cordova',
  281. 'react-native',
  282. 'flutter',
  283. 'dart-flutter',
  284. // backend
  285. 'native',
  286. 'node',
  287. 'node-express',
  288. 'node-koa',
  289. 'node-connect',
  290. 'python',
  291. 'python-django',
  292. 'python-flask',
  293. 'python-fastapi',
  294. 'python-starlette',
  295. 'python-sanic',
  296. 'python-celery',
  297. 'python-bottle',
  298. 'python-pylons',
  299. 'python-pyramid',
  300. 'python-tornado',
  301. 'python-rq',
  302. 'python-pymongo',
  303. 'rust',
  304. // serverless
  305. // desktop
  306. 'apple-macos',
  307. 'native',
  308. 'native-crashpad',
  309. 'native-breakpad',
  310. 'native-qt',
  311. ];
  312. export const replayPlatforms: readonly PlatformKey[] = [
  313. 'capacitor',
  314. 'electron',
  315. 'javascript-angular',
  316. // 'javascript-angularjs', // Unsupported, angularjs requires the v6.x core SDK
  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. /**
  331. * The list of platforms for which we have created onboarding instructions.
  332. * Should be a subset of the list of `replayPlatforms`.
  333. * This should match sentry-docs: `/src/wizard/${platform}/replay-onboarding/${subPlatform}/`.
  334. * See: https://github.com/getsentry/sentry-docs/tree/master/src/wizard/javascript/replay-onboarding
  335. */
  336. export const replayOnboardingPlatforms: readonly PlatformKey[] = [
  337. 'capacitor',
  338. 'electron',
  339. 'javascript-angular',
  340. // 'javascript-angularjs', // Unsupported, angularjs requires the v6.x core SDK
  341. // 'javascript-backbone', // No docs yet
  342. 'javascript-capacitor',
  343. 'javascript-electron',
  344. 'javascript-ember',
  345. 'javascript-gatsby',
  346. 'javascript-nextjs',
  347. 'javascript-react',
  348. 'javascript-remix',
  349. 'javascript-svelte',
  350. 'javascript-sveltekit',
  351. 'javascript-vue',
  352. 'javascript',
  353. ];
  354. /**
  355. * Additional aliases used for filtering in the platform picker
  356. */
  357. export const filterAliases: Partial<Record<PlatformKey, string[]>> = {
  358. native: ['cpp', 'c++'],
  359. };
  360. export type PlatformKey =
  361. | (typeof popularPlatformCategories)[number]
  362. | (typeof frontend)[number]
  363. | (typeof mobile)[number]
  364. | (typeof backend)[number]
  365. | (typeof desktop)[number]
  366. | (typeof tracing)[number]
  367. | (typeof serverless)[number]
  368. | 'other';
  369. export default categoryList;
  370. export type Platform = {
  371. key: PlatformKey;
  372. id?: string;
  373. link?: string | null;
  374. name?: string;
  375. };