platformCategories.tsx 7.5 KB

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