platformCategories.tsx 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. import {PlatformKey} from 'sentry/types';
  2. export enum PlatformCategory {
  3. FRONTEND,
  4. MOBILE,
  5. BACKEND,
  6. SERVERLESS,
  7. DESKTOP,
  8. OTHER,
  9. }
  10. // Mirrors `FRONTEND` in src/sentry/utils/platform_categories.py
  11. // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
  12. export const frontend: PlatformKey[] = [
  13. 'dart',
  14. 'javascript',
  15. 'javascript-angular',
  16. 'javascript-angularjs',
  17. 'javascript-astro',
  18. 'javascript-backbone',
  19. 'javascript-ember',
  20. 'javascript-gatsby',
  21. 'javascript-nextjs',
  22. 'javascript-react',
  23. 'javascript-remix',
  24. 'javascript-svelte',
  25. 'javascript-sveltekit',
  26. 'javascript-vue',
  27. 'unity',
  28. ];
  29. // Mirrors `MOBILE` in src/sentry/utils/platform_categories.py
  30. // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
  31. export const mobile: PlatformKey[] = [
  32. 'android',
  33. 'apple-ios',
  34. 'capacitor',
  35. 'cordova',
  36. 'dart-flutter',
  37. 'dotnet-maui',
  38. 'dotnet-xamarin',
  39. 'flutter',
  40. 'ionic',
  41. 'javascript-capacitor',
  42. 'javascript-cordova',
  43. 'react-native',
  44. 'unity',
  45. 'unreal',
  46. // Old platforms
  47. 'java-android',
  48. 'cocoa-objc',
  49. 'cocoa-swift',
  50. ];
  51. // Mirrors `BACKEND` in src/sentry/utils/platform_categories.py
  52. // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
  53. export const backend: PlatformKey[] = [
  54. 'bun',
  55. 'dotnet',
  56. 'dotnet-aspnetcore',
  57. 'dotnet-aspnet',
  58. 'elixir',
  59. 'go',
  60. 'go-echo',
  61. 'go-fasthttp',
  62. 'go-gin',
  63. 'go-http',
  64. 'go-iris',
  65. 'go-martini',
  66. 'java',
  67. 'java-appengine',
  68. 'java-log4j',
  69. 'java-log4j2',
  70. 'java-logback',
  71. 'java-logging',
  72. 'java-spring',
  73. 'java-spring-boot',
  74. 'kotlin',
  75. 'native',
  76. 'node',
  77. 'node-express',
  78. 'node-koa',
  79. 'node-connect',
  80. 'perl',
  81. 'php',
  82. 'php-laravel',
  83. 'php-monolog',
  84. 'php-symfony',
  85. 'python',
  86. 'python-aiohttp',
  87. 'python-asgi',
  88. 'python-bottle',
  89. 'python-celery',
  90. 'python-chalice',
  91. 'python-django',
  92. 'python-falcon',
  93. 'python-fastapi',
  94. 'python-flask',
  95. 'python-pylons',
  96. 'python-pymongo',
  97. 'python-pyramid',
  98. 'python-quart',
  99. 'python-rq',
  100. 'python-sanic',
  101. 'python-starlette',
  102. 'python-tornado',
  103. 'python-tryton',
  104. 'python-wsgi',
  105. 'ruby',
  106. 'ruby-rails',
  107. 'ruby-rack',
  108. 'rust',
  109. ];
  110. // Mirrors `SERVERLESS` in src/sentry/utils/platform_categories.py
  111. // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
  112. export const serverless: PlatformKey[] = [
  113. 'dotnet-awslambda',
  114. 'dotnet-gcpfunctions',
  115. 'node-awslambda',
  116. 'node-azurefunctions',
  117. 'node-gcpfunctions',
  118. 'python-awslambda',
  119. 'python-azurefunctions',
  120. 'python-gcpfunctions',
  121. 'python-serverless',
  122. ];
  123. // Mirrors `DESKTOP` in src/sentry/utils/platform_categories.py
  124. // When changing this file, make sure to keep src/sentry/utils/platform_categories.py in sync.
  125. export const desktop: PlatformKey[] = [
  126. 'apple-macos',
  127. 'dotnet-maui',
  128. 'dotnet-winforms',
  129. 'dotnet-wpf',
  130. 'dotnet',
  131. 'electron',
  132. 'flutter',
  133. 'java',
  134. 'javascript-electron',
  135. 'kotlin',
  136. 'minidump',
  137. 'native',
  138. 'native-breakpad',
  139. 'native-crashpad',
  140. 'native-minidump',
  141. 'native-qt',
  142. 'unity',
  143. 'unreal',
  144. ];
  145. export const sourceMaps: PlatformKey[] = [
  146. ...frontend,
  147. 'react-native',
  148. 'cordova',
  149. 'electron',
  150. ];
  151. export const performance: PlatformKey[] = [
  152. 'bun',
  153. 'javascript',
  154. 'javascript-ember',
  155. 'javascript-react',
  156. 'javascript-vue',
  157. 'php',
  158. 'php-laravel',
  159. 'python',
  160. 'python-django',
  161. 'python-flask',
  162. 'python-fastapi',
  163. 'python-starlette',
  164. 'python-sanic',
  165. 'python-celery',
  166. 'python-bottle',
  167. 'python-pylons',
  168. 'python-pyramid',
  169. 'python-tornado',
  170. 'python-rq',
  171. 'node',
  172. 'node-express',
  173. 'node-koa',
  174. 'node-connect',
  175. ];
  176. // List of platforms that have performance onboarding checklist content
  177. export const withPerformanceOnboarding: Set<PlatformKey> = new Set([
  178. 'javascript',
  179. 'javascript-react',
  180. ]);
  181. // List of platforms that do not have performance support. We make use of this list in the product to not provide any Performance
  182. // views such as Performance onboarding checklist.
  183. export const withoutPerformanceSupport: Set<PlatformKey> = new Set([
  184. 'elixir',
  185. 'minidump',
  186. ]);
  187. export const profiling: PlatformKey[] = [
  188. // mobile
  189. 'android',
  190. 'apple-ios',
  191. // go
  192. 'go',
  193. // nodejs
  194. 'node',
  195. 'node-express',
  196. 'node-koa',
  197. 'node-connect',
  198. 'javascript-nextjs',
  199. 'javascript-remix',
  200. 'javascript-sveltekit',
  201. 'javascript',
  202. 'javascript-react',
  203. // react-native
  204. 'react-native',
  205. // python
  206. 'python',
  207. 'python-django',
  208. 'python-flask',
  209. 'python-fastapi',
  210. 'python-starlette',
  211. 'python-sanic',
  212. 'python-celery',
  213. 'python-bottle',
  214. 'python-pylons',
  215. 'python-pyramid',
  216. 'python-tornado',
  217. 'python-rq',
  218. 'python-aiohttp',
  219. 'python-chalice',
  220. 'python-falcon',
  221. 'python-quart',
  222. 'python-tryton',
  223. 'python-wsgi',
  224. 'python-serverless',
  225. // rust
  226. 'rust',
  227. // php
  228. 'php',
  229. 'php-laravel',
  230. 'php-symfony',
  231. // ruby
  232. 'ruby',
  233. 'ruby-rails',
  234. 'ruby-rack',
  235. ];
  236. export const releaseHealth: PlatformKey[] = [
  237. // frontend
  238. 'javascript',
  239. 'javascript-react',
  240. 'javascript-angular',
  241. 'javascript-angularjs',
  242. 'javascript-astro',
  243. 'javascript-backbone',
  244. 'javascript-ember',
  245. 'javascript-gatsby',
  246. 'javascript-vue',
  247. 'javascript-nextjs',
  248. 'javascript-remix',
  249. 'javascript-svelte',
  250. 'javascript-sveltekit',
  251. // mobile
  252. 'android',
  253. 'apple-ios',
  254. 'cordova',
  255. 'javascript-cordova',
  256. 'react-native',
  257. 'flutter',
  258. 'dart-flutter',
  259. // backend
  260. 'bun',
  261. 'native',
  262. 'node',
  263. 'node-express',
  264. 'node-koa',
  265. 'node-connect',
  266. 'python',
  267. 'python-django',
  268. 'python-flask',
  269. 'python-fastapi',
  270. 'python-starlette',
  271. 'python-sanic',
  272. 'python-celery',
  273. 'python-bottle',
  274. 'python-pylons',
  275. 'python-pyramid',
  276. 'python-tornado',
  277. 'python-rq',
  278. 'python-pymongo',
  279. 'rust',
  280. // serverless
  281. // desktop
  282. 'apple-macos',
  283. 'native',
  284. 'native-crashpad',
  285. 'native-breakpad',
  286. 'native-qt',
  287. ];
  288. // These are the backend platforms that can set up replay -- e.g. they can be set up via a linked JS framework or via JS loader.
  289. const replayBackendPlatforms: readonly PlatformKey[] = [
  290. 'bun',
  291. 'dotnet-aspnetcore',
  292. 'dotnet-aspnet',
  293. 'elixir',
  294. 'go-echo',
  295. 'go-fasthttp',
  296. 'go-gin',
  297. 'go-iris',
  298. 'go-martini',
  299. 'java-spring',
  300. 'java-spring-boot',
  301. 'node',
  302. 'node-express',
  303. 'php',
  304. 'php-laravel',
  305. 'php-symfony',
  306. 'python-aiohttp',
  307. 'python-bottle',
  308. 'python-django',
  309. 'python-falcon',
  310. 'python-fastapi',
  311. 'python-flask',
  312. 'python-pyramid',
  313. 'python-quart',
  314. 'python-sanic',
  315. 'python-starlette',
  316. 'python-tornado',
  317. 'ruby-rails',
  318. ];
  319. // These are the frontend platforms that can set up replay.
  320. const replayFrontendPlatforms: readonly PlatformKey[] = [
  321. 'capacitor',
  322. 'electron',
  323. 'javascript-angular',
  324. 'javascript-astro',
  325. 'javascript-backbone',
  326. 'javascript-capacitor',
  327. 'javascript-electron',
  328. 'javascript-ember',
  329. 'javascript-gatsby',
  330. 'javascript-nextjs',
  331. 'javascript-react',
  332. 'javascript-remix',
  333. 'javascript-svelte',
  334. 'javascript-sveltekit',
  335. 'javascript-vue',
  336. 'javascript',
  337. ];
  338. // These are all the platforms that can set up replay.
  339. export const replayPlatforms: readonly PlatformKey[] = [
  340. ...replayFrontendPlatforms,
  341. ...replayBackendPlatforms,
  342. ];
  343. /**
  344. * The list of platforms for which we have created onboarding instructions.
  345. * Should be a subset of the list of `replayPlatforms`.
  346. * This should match sentry-docs: `/src/wizard/${platform}/replay-onboarding/${subPlatform}/`.
  347. * See: https://github.com/getsentry/sentry-docs/tree/master/src/wizard/javascript/replay-onboarding
  348. */
  349. export const replayOnboardingPlatforms: readonly PlatformKey[] = [
  350. ...replayFrontendPlatforms.filter(p => !['javascript-backbone'].includes(p)),
  351. ...replayBackendPlatforms,
  352. ];
  353. // These are the supported replay platforms that can also be set up using the JS loader.
  354. export const replayJsLoaderInstructionsPlatformList: readonly PlatformKey[] = [
  355. 'javascript',
  356. ...replayBackendPlatforms,
  357. ];