|
| 1 | +<PlatformContent includePath="getting-started-primer" /> |
| 2 | + |
| 3 | +I AM VERSIONED v7.119.0 |
| 4 | + |
| 5 | +<PlatformSection notSupported={["javascript.capacitor", "javascript.cordova", "javascript.solid", "javascript.solidstart"]}> |
| 6 | + |
| 7 | +<Note> |
| 8 | + We've released version 8 of the JavaScript SDKs. If you're using version 7.x, |
| 9 | + we recommend upgrading to the latest version. Check out the [Migration |
| 10 | + docs](./migration/v7-to-v8/) to learn how to make the switch. |
| 11 | +</Note> |
| 12 | + |
| 13 | +</PlatformSection> |
| 14 | + |
| 15 | +<PlatformSection noGuides> |
| 16 | + |
| 17 | +<Alert level="info" title="Using a framework?"> |
| 18 | + |
| 19 | +Check out the other SDKs we support in the left-hand dropdown. |
| 20 | + |
| 21 | +</Alert> |
| 22 | + |
| 23 | +<PlatformContent includePath="getting-started-primer" /> |
| 24 | + |
| 25 | +</PlatformSection> |
| 26 | + |
| 27 | +<PlatformSection supported={["javascript", "javascript.angular", "javascript.nextjs", "javascript.remix", "javascript.sveltekit", "javascript.bun", "javascript.ember", "javascript.angular", "javascript.deno","javascript.nuxt", "javascript.react", "javascript.solid", "javascript.svelte", "javascript.vue"]}> |
| 28 | + |
| 29 | +## Prerequisites |
| 30 | + |
| 31 | +- A [Sentry account](https://sentry.io/signup/) and [Project](/product/projects/). |
| 32 | + |
| 33 | +</PlatformSection> |
| 34 | + |
| 35 | +Don't have a Sentry account? Sign up for [Sentry for free](https://sentry.io/signup/), then return to this page. |
| 36 | + |
| 37 | +<PlatformSection noGuides> |
| 38 | + |
| 39 | +If you prefer to follow video instructions, see [How to Install the Sentry JavaScript SDK in 60 Seconds](https://vimeo.com/899367471). |
| 40 | + |
| 41 | +</PlatformSection> |
| 42 | + |
| 43 | +<PlatformSection supported={["javascript.react"]}> |
| 44 | + |
| 45 | +If you prefer to follow video instructions, see [How to Install the Sentry React SDK in 60 Seconds](https://vimeo.com/899368791). |
| 46 | + |
| 47 | +</PlatformSection> |
| 48 | + |
| 49 | +<PlatformSection supported={["javascript.nextjs"]}> |
| 50 | + |
| 51 | +If you prefer to follow video instructions, see [How to Install the Sentry Next.js SDK in 60 Seconds](https://vimeo.com/899368048). |
| 52 | + |
| 53 | +</PlatformSection> |
| 54 | + |
| 55 | +<PlatformSection notSupported={["javascript.deno"]}> |
| 56 | + |
| 57 | +<PlatformSection notSupported={["javascript", "javascript.astro", "javascript.cordova", "javascript.nextjs", "javascript.nuxt", "javascript.remix", "javascript.solidstart", "javascript.sveltekit", "javascript.bun"]}> |
| 58 | + |
| 59 | +## Features |
| 60 | + |
| 61 | +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also get to the root of an error or performance issue faster, by watching a video-like reproduction of a user session with [session replay](/product/explore/session-replay/web/getting-started/). |
| 62 | + |
| 63 | +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. |
| 64 | + |
| 65 | +</PlatformSection> |
| 66 | + |
| 67 | +## Install |
| 68 | + |
| 69 | +<PlatformCategorySection notSupported={["server"]}> |
| 70 | + <PlatformSection notSupported={["javascript", "javascript.cordova"]}> |
| 71 | + <OnboardingOptionButtons |
| 72 | + options={["error-monitoring", "performance", "session-replay"]} |
| 73 | + /> |
| 74 | + </PlatformSection> |
| 75 | +</PlatformCategorySection> |
| 76 | + |
| 77 | +<PlatformSection notSupported={["javascript", "javascript.astro", "javascript.cordova", "javascript.nextjs", "javascript.nuxt", "javascript.remix", "javascript.sveltekit", "javascript.bun", "javascript.capacitor", "javascript.ember", "javascript.angular", "javascript.react", "javascript.solid", "javascript.solidstart", "javascript.svelte", "javascript.vue"]}> |
| 78 | + |
| 79 | +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). You can also collect and analyze performance profiles from real users with [profiling](/product/explore/profiling/). |
| 80 | + |
| 81 | +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. |
| 82 | + |
| 83 | +</PlatformSection> |
| 84 | + |
| 85 | +<PlatformCategorySection notSupported={["browser"]}> |
| 86 | + <PlatformSection notSupported={["javascript.bun"]}> |
| 87 | + <OnboardingOptionButtons |
| 88 | + options={["error-monitoring", "performance", "profiling"]} |
| 89 | + /> |
| 90 | + </PlatformSection> |
| 91 | + |
| 92 | +In addition to capturing errors, you can monitor interactions between multiple services or applications by [enabling tracing](/concepts/key-terms/tracing/). |
| 93 | + |
| 94 | +Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below. |
| 95 | + |
| 96 | + <PlatformSection supported={["javascript.bun"]}> |
| 97 | + <OnboardingOptionButtons options={["error-monitoring", "performance"]} /> |
| 98 | + </PlatformSection> |
| 99 | +</PlatformCategorySection> |
| 100 | + |
| 101 | +Sentry captures data by using an SDK within your application’s runtime. |
| 102 | + |
| 103 | +<PlatformContent includePath="getting-started-install" /> |
| 104 | + |
| 105 | +</PlatformSection> |
| 106 | + |
| 107 | +## Configure |
| 108 | + |
| 109 | +<PlatformSection notSupported={["javascript.nextjs", "javascript.astro", "javascript.react"]}> |
| 110 | + |
| 111 | +Configuration should happen as early as possible in your application's lifecycle. |
| 112 | + |
| 113 | +</PlatformSection> |
| 114 | + |
| 115 | +<PlatformSection supported={["javascript.react"]}> |
| 116 | + |
| 117 | +Sentry supports multiple versions of React Router. To learn how to configure them, read the <PlatformLink to="/configuration/integrations/react-router/">React Router Integration</PlatformLink> docs. |
| 118 | + |
| 119 | +</PlatformSection> |
| 120 | + |
| 121 | +<PlatformContent includePath="getting-started-config" /> |
| 122 | + |
| 123 | +<PlatformContent includePath="getting-started-sourcemaps" /> |
| 124 | + |
| 125 | +<PlatformSection supported={["javascript.bun"]}> |
| 126 | + |
| 127 | +## Use |
| 128 | + |
| 129 | +{" "} |
| 130 | + |
| 131 | +<PlatformContent includePath="getting-started-use" /> |
| 132 | + |
| 133 | +</PlatformSection> |
| 134 | + |
| 135 | +## Verify |
| 136 | + |
| 137 | +This snippet includes an intentional error, so you can test that everything is working as soon as you set it up. |
| 138 | + |
| 139 | +<PlatformContent includePath="getting-started-verify" /> |
| 140 | + |
| 141 | +<Note> |
| 142 | + |
| 143 | +Learn more about manually capturing an error or message in our <PlatformLink to="/usage/">Usage documentation</PlatformLink>. |
| 144 | + |
| 145 | +</Note> |
| 146 | + |
| 147 | +To view and resolve the recorded error, log into [sentry.io](https://sentry.io) and select your project. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved. |
0 commit comments