platformCategories.tsx 7.0 KB

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