platformCategories.tsx 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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. // python, WSGI only
  213. 'python',
  214. 'python-django',
  215. 'python-flask',
  216. 'python-fastapi',
  217. 'python-starlette',
  218. 'python-sanic',
  219. 'python-celery',
  220. 'python-bottle',
  221. 'python-pylons',
  222. 'python-pyramid',
  223. 'python-tornado',
  224. 'python-rq',
  225. // rust
  226. 'rust',
  227. ] as const;
  228. export const releaseHealth: PlatformKey[] = [
  229. // frontend
  230. 'javascript',
  231. 'javascript-react',
  232. 'javascript-angular',
  233. 'javascript-angularjs',
  234. 'javascript-backbone',
  235. 'javascript-ember',
  236. 'javascript-gatsby',
  237. 'javascript-vue',
  238. 'javascript-nextjs',
  239. 'javascript-remix',
  240. 'javascript-svelte',
  241. // mobile
  242. 'android',
  243. 'apple-ios',
  244. 'cordova',
  245. 'javascript-cordova',
  246. 'react-native',
  247. 'flutter',
  248. 'dart-flutter',
  249. // backend
  250. 'native',
  251. 'node',
  252. 'node-express',
  253. 'node-koa',
  254. 'node-connect',
  255. 'python',
  256. 'python-django',
  257. 'python-flask',
  258. 'python-fastapi',
  259. 'python-starlette',
  260. 'python-sanic',
  261. 'python-celery',
  262. 'python-bottle',
  263. 'python-pylons',
  264. 'python-pyramid',
  265. 'python-tornado',
  266. 'python-rq',
  267. 'rust',
  268. // serverless
  269. // desktop
  270. 'apple-macos',
  271. 'native',
  272. 'native-crashpad',
  273. 'native-breakpad',
  274. 'native-qt',
  275. ];
  276. export const replayPlatforms: readonly PlatformKey[] = [
  277. 'javascript-angular',
  278. // 'javascript-angularjs', // Unsupported, angularjs requires the v6.x core SDK
  279. 'javascript-backbone',
  280. 'javascript-ember',
  281. 'javascript-gatsby',
  282. 'javascript-nextjs',
  283. 'javascript-react',
  284. 'javascript-remix',
  285. 'javascript-svelte',
  286. 'javascript-vue',
  287. 'javascript',
  288. ];
  289. /**
  290. * The list of platforms for which we have created onboarding instructions.
  291. * Should be a subset of the list of `replayPlatforms`.
  292. * This should match sentry-docs: `/src/wizard/${platform}/replay-onboarding/${subPlatform}/`.
  293. * See: https://github.com/getsentry/sentry-docs/tree/master/src/wizard/javascript/replay-onboarding
  294. */
  295. export const replayOnboardingPlatforms: readonly PlatformKey[] = [
  296. 'javascript-angular',
  297. // 'javascript-angularjs', // Unsupported, angularjs requires the v6.x core SDK
  298. // 'javascript-backbone', // No docs yet
  299. 'javascript-ember',
  300. 'javascript-gatsby',
  301. 'javascript-nextjs',
  302. 'javascript-react',
  303. 'javascript-remix',
  304. 'javascript-svelte',
  305. 'javascript-vue',
  306. 'javascript',
  307. ];
  308. /**
  309. * Additional aliases used for filtering in the platform picker
  310. */
  311. export const filterAliases: Partial<Record<PlatformKey, string[]>> = {
  312. native: ['cpp', 'c++'],
  313. };
  314. export type PlatformKey =
  315. | (typeof popularPlatformCategories)[number]
  316. | (typeof frontend)[number]
  317. | (typeof mobile)[number]
  318. | (typeof backend)[number]
  319. | (typeof desktop)[number]
  320. | (typeof tracing)[number]
  321. | (typeof serverless)[number]
  322. | 'other';
  323. export default categoryList;