remix.tsx 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. import ExternalLink from 'sentry/components/links/externalLink';
  2. import List from 'sentry/components/list';
  3. import ListItem from 'sentry/components/list/listItem';
  4. import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/step';
  5. import {
  6. Docs,
  7. OnboardingConfig,
  8. } from 'sentry/components/onboarding/gettingStartedDoc/types';
  9. import {t, tct} from 'sentry/locale';
  10. const onboarding: OnboardingConfig = {
  11. introduction: () =>
  12. tct("Sentry's integration with [remixLink:Remix] supports Remix 1.0.0 and above.", {
  13. remixLink: <ExternalLink href="https://remix.run/" />,
  14. }),
  15. install: () => [
  16. {
  17. type: StepType.INSTALL,
  18. configurations: [
  19. {
  20. description: t(
  21. 'Install and configure the Sentry Remix SDK automatically with our wizard:'
  22. ),
  23. language: 'bash',
  24. code: [
  25. {
  26. label: 'bash',
  27. value: 'bash',
  28. language: 'bash',
  29. code: `npx @sentry/wizard@latest -i remix`,
  30. },
  31. ],
  32. },
  33. ],
  34. },
  35. ],
  36. configure: () => [
  37. {
  38. type: StepType.CONFIGURE,
  39. description: t(
  40. 'The Sentry wizard will automatically add code to your project to inialize and configure the Sentry SDK:'
  41. ),
  42. configurations: [
  43. {
  44. description: (
  45. <List symbol="bullet">
  46. <ListItem>
  47. {tct(
  48. "Create two files in the root directory of your project, [clientEntry:entry.client.tsx] and [serverEntry:entry.server.tsx] (if they don't already exist).",
  49. {
  50. clientEntry: <code />,
  51. serverEntry: <code />,
  52. }
  53. )}
  54. </ListItem>
  55. <ListItem>
  56. {tct(
  57. 'Add the default [sentryInitCode:Sentry.init] call to both, client and server entry files.',
  58. {
  59. sentryInitCode: <code />,
  60. }
  61. )}
  62. </ListItem>
  63. <ListItem>
  64. {tct(
  65. 'Create a [cliRc:.sentryclirc] with an auth token to upload source maps (this file is automatically added to your [gitignore:.gitignore]).',
  66. {
  67. cliRc: <code />,
  68. gitignore: <code />,
  69. }
  70. )}
  71. </ListItem>
  72. <ListItem>
  73. {tct(
  74. 'Adjust your [buildscript:build] script in your [pkgJson:package.json] to automatically upload source maps to Sentry when you build your application.',
  75. {
  76. buildscript: <code />,
  77. pkgJson: <code />,
  78. }
  79. )}
  80. </ListItem>
  81. </List>
  82. ),
  83. },
  84. {
  85. description: tct(
  86. 'You can also further [manualConfigure:configure your SDK] or [manualSetupLink:set it up manually], without the wizard.',
  87. {
  88. manualConfigure: (
  89. <ExternalLink href="https://docs.sentry.io/platforms/javascript/guides/remix/manual-setup/#configuration" />
  90. ),
  91. manualSetupLink: (
  92. <ExternalLink href="https://docs.sentry.io/platforms/javascript/guides/remix/manual-setup/" />
  93. ),
  94. }
  95. ),
  96. },
  97. ],
  98. },
  99. ],
  100. verify: () => [],
  101. nextSteps: () => [
  102. {
  103. id: 'performance-monitoring',
  104. name: t('Performance Monitoring'),
  105. description: t(
  106. 'Track down transactions to connect the dots between 10-second page loads and poor-performing API calls or slow database queries.'
  107. ),
  108. link: 'https://docs.sentry.io/platforms/javascript/guides/remix/performance/',
  109. },
  110. {
  111. id: 'session-replay',
  112. name: t('Session Replay'),
  113. description: t(
  114. 'Get to the root cause of an error or latency issue faster by seeing all the technical details related to that issue in one visual replay on your web application.'
  115. ),
  116. link: 'https://docs.sentry.io/platforms/javascript/guides/remix/session-replay/',
  117. },
  118. ],
  119. };
  120. const docs: Docs = {
  121. onboarding,
  122. };
  123. export default docs;