platformCategories.tsx 6.6 KB

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