platformCategories.tsx 7.2 KB

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