platformCategories.tsx 7.1 KB

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