platformCategories.tsx 7.7 KB

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