platformCategories.tsx 6.9 KB

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