platformCategories.tsx 6.9 KB

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