You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sentry captures data by using an SDK within your application's runtime.
19
+
Run the command for your preferred package manager to add the Sentry SDK to your application:
14
20
15
21
```bash {tabTitle:npm}
16
22
npm install @sentry/solid --save
@@ -24,11 +30,9 @@ yarn add @sentry/solid
24
30
pnpm add @sentry/solid
25
31
```
26
32
27
-
## Configure
28
-
29
-
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/).
33
+
## Step 2: Configure
30
34
31
-
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
35
+
Choose the features you want to configure, and this guide will show you how:
32
36
33
37
<OnboardingOptionButtons
34
38
options={[
@@ -40,11 +44,11 @@ Select which Sentry features you'd like to install in addition to Error Monitori
40
44
]}
41
45
/>
42
46
43
-
Configuration should happen as early as possible in your application's lifecycle.
To use the SDK, initialize it in your Solid entry point before bootstrapping your app. In a typical Solid project, that is your `index.jsx` file.
49
+
### Initialize the Sentry SDK
46
50
47
-
<Alert>We currently support Solid 1.8.4 and up.</Alert>
51
+
Initialize Sentry as early as possible in your application, for example, in your `index.(jsx|tsx)` file:
48
52
49
53
```javascript {filename: index.jsx}
50
54
import*asSentryfrom"@sentry/solid";
@@ -114,31 +118,87 @@ if (!app) throw new Error("No #app element found in the DOM.");
114
118
render(() =><App />, app);
115
119
```
116
120
117
-
Once you've done this, the SDK will automatically capture unhandled errors and promise rejections, and monitor performance in the client. You can also [manually capture errors](/platforms/javascript/guides/solid/usage).
121
+
## Step 3: Capture Solid Errors
122
+
123
+
To automatically report exceptions from inside a component tree to Sentry, wrap Solid's `ErrorBoundary` with Sentry's helper function:
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