platformCategories.tsx 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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-symfony',
  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-asgi',
  116. 'python-bottle',
  117. 'python-pylons',
  118. 'python-pyramid',
  119. 'python-tornado',
  120. 'python-rq',
  121. 'python-pymongo',
  122. 'ruby',
  123. 'ruby-rails',
  124. 'ruby-rack',
  125. 'rust',
  126. 'kotlin',
  127. ] as const;
  128. export const serverless = [
  129. 'python-awslambda',
  130. 'python-azurefunctions',
  131. 'python-gcpfunctions',
  132. 'python-serverless',
  133. 'node-awslambda',
  134. 'node-azurefunctions',
  135. 'node-gcpfunctions',
  136. 'dotnet-awslambda',
  137. 'dotnet-gcpfunctions',
  138. ] as const;
  139. export const desktop = [
  140. 'apple-macos',
  141. 'dotnet',
  142. 'dotnet-winforms',
  143. 'dotnet-wpf',
  144. 'dotnet-maui',
  145. 'java',
  146. 'electron',
  147. 'javascript-electron',
  148. 'native',
  149. 'native-crashpad',
  150. 'native-breakpad',
  151. 'native-minidump',
  152. 'native-qt',
  153. 'minidump',
  154. 'unity',
  155. 'flutter',
  156. 'kotlin',
  157. 'unreal',
  158. ] as const;
  159. const categoryList = [
  160. {id: 'popular', name: t('Popular'), platforms: popularPlatformCategories},
  161. {id: 'browser', name: t('Browser'), platforms: frontend},
  162. {id: 'server', name: t('Server'), platforms: backend},
  163. {id: 'mobile', name: t('Mobile'), platforms: mobile},
  164. {id: 'desktop', name: t('Desktop'), platforms: desktop},
  165. {id: 'serverless', name: t('Serverless'), platforms: serverless},
  166. ] as const;
  167. export const deprecatedPlatforms = new Set([
  168. 'node-serverlesscloud',
  169. 'python-pylons',
  170. 'python-pymongo',
  171. ]);
  172. export const sourceMaps: PlatformKey[] = [
  173. ...frontend,
  174. 'react-native',
  175. 'cordova',
  176. 'electron',
  177. ];
  178. export const tracing = [
  179. 'python-tracing',
  180. 'node-tracing',
  181. 'react-native-tracing',
  182. ] as const;
  183. export const performance = [
  184. 'javascript',
  185. 'javascript-ember',
  186. 'javascript-react',
  187. 'javascript-vue',
  188. 'php',
  189. 'php-laravel',
  190. 'python',
  191. 'python-django',
  192. 'python-flask',
  193. 'python-fastapi',
  194. 'python-starlette',
  195. 'python-sanic',
  196. 'python-celery',
  197. 'python-bottle',
  198. 'python-pylons',
  199. 'python-pyramid',
  200. 'python-tornado',
  201. 'python-rq',
  202. 'node',
  203. 'node-express',
  204. 'node-koa',
  205. 'node-connect',
  206. ];
  207. // List of platforms that have performance onboarding checklist content
  208. export const withPerformanceOnboarding: Set<PlatformKey> = new Set([
  209. 'javascript',
  210. 'javascript-react',
  211. ]);
  212. // List of platforms that do not have performance support. We make use of this list in the product to not provide any Performance
  213. // views such as Performance onboarding checklist.
  214. export const withoutPerformanceSupport: Set<PlatformKey> = new Set([
  215. 'elixir',
  216. 'minidump',
  217. ]);
  218. export const profiling: PlatformKey[] = [
  219. // mobile
  220. 'android',
  221. 'apple-ios',
  222. // go
  223. 'go',
  224. // nodejs
  225. 'node',
  226. 'node-express',
  227. 'node-koa',
  228. 'node-connect',
  229. 'javascript-nextjs',
  230. 'javascript-remix',
  231. 'javascript-sveltekit',
  232. 'javascript',
  233. 'javascript-react',
  234. // react-native
  235. 'react-native',
  236. // python
  237. 'python',
  238. 'python-django',
  239. 'python-flask',
  240. 'python-fastapi',
  241. 'python-starlette',
  242. 'python-sanic',
  243. 'python-celery',
  244. 'python-bottle',
  245. 'python-pylons',
  246. 'python-pyramid',
  247. 'python-tornado',
  248. 'python-rq',
  249. 'python-aiohttp',
  250. 'python-chalice',
  251. 'python-falcon',
  252. 'python-quart',
  253. 'python-tryton',
  254. 'python-wsgi',
  255. 'python-serverless',
  256. // rust
  257. 'rust',
  258. // php
  259. 'php',
  260. 'php-laravel',
  261. 'php-symfony',
  262. // ruby
  263. 'ruby',
  264. 'ruby-rails',
  265. 'ruby-rack',
  266. ];
  267. export const releaseHealth: PlatformKey[] = [
  268. // frontend
  269. 'javascript',
  270. 'javascript-react',
  271. 'javascript-angular',
  272. 'javascript-angularjs',
  273. 'javascript-backbone',
  274. 'javascript-ember',
  275. 'javascript-gatsby',
  276. 'javascript-vue',
  277. 'javascript-nextjs',
  278. 'javascript-remix',
  279. 'javascript-svelte',
  280. 'javascript-sveltekit',
  281. // mobile
  282. 'android',
  283. 'apple-ios',
  284. 'cordova',
  285. 'javascript-cordova',
  286. 'react-native',
  287. 'flutter',
  288. 'dart-flutter',
  289. // backend
  290. 'native',
  291. 'node',
  292. 'node-express',
  293. 'node-koa',
  294. 'node-connect',
  295. 'python',
  296. 'python-django',
  297. 'python-flask',
  298. 'python-fastapi',
  299. 'python-starlette',
  300. 'python-sanic',
  301. 'python-celery',
  302. 'python-bottle',
  303. 'python-pylons',
  304. 'python-pyramid',
  305. 'python-tornado',
  306. 'python-rq',
  307. 'python-pymongo',
  308. 'rust',
  309. // serverless
  310. // desktop
  311. 'apple-macos',
  312. 'native',
  313. 'native-crashpad',
  314. 'native-breakpad',
  315. 'native-qt',
  316. ];
  317. export const replayPlatforms: readonly PlatformKey[] = [
  318. 'capacitor',
  319. 'electron',
  320. 'javascript-angular',
  321. // 'javascript-angularjs', // Unsupported, angularjs requires the v6.x core SDK
  322. 'javascript-backbone',
  323. 'javascript-capacitor',
  324. 'javascript-electron',
  325. 'javascript-ember',
  326. 'javascript-gatsby',
  327. 'javascript-nextjs',
  328. 'javascript-react',
  329. 'javascript-remix',
  330. 'javascript-svelte',
  331. 'javascript-sveltekit',
  332. 'javascript-vue',
  333. 'javascript',
  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. 'capacitor',
  343. 'electron',
  344. 'javascript-angular',
  345. // 'javascript-angularjs', // Unsupported, angularjs requires the v6.x core SDK
  346. // 'javascript-backbone', // No docs yet
  347. 'javascript-capacitor',
  348. 'javascript-electron',
  349. 'javascript-ember',
  350. 'javascript-gatsby',
  351. 'javascript-nextjs',
  352. 'javascript-react',
  353. 'javascript-remix',
  354. 'javascript-svelte',
  355. 'javascript-sveltekit',
  356. 'javascript-vue',
  357. 'javascript',
  358. ];
  359. /**
  360. * Additional aliases used for filtering in the platform picker
  361. */
  362. export const filterAliases: Partial<Record<PlatformKey, string[]>> = {
  363. native: ['cpp', 'c++'],
  364. };
  365. export type PlatformKey =
  366. | (typeof popularPlatformCategories)[number]
  367. | (typeof frontend)[number]
  368. | (typeof mobile)[number]
  369. | (typeof backend)[number]
  370. | (typeof desktop)[number]
  371. | (typeof tracing)[number]
  372. | (typeof serverless)[number]
  373. | 'other';
  374. export default categoryList;
  375. export type Platform = {
  376. key: PlatformKey;
  377. id?: string;
  378. link?: string | null;
  379. name?: string;
  380. };