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
Initialize Sentry as early as possible in your application. We recommend putting the import of your initialization code as the first import in your app's entry point:
117
91
118
-
### Apply Instrumentation to Your App
119
-
120
-
Initialize Sentry as early as possible in your application. We recommend putting the import of your initialization code as the first import in your app's entry point:
121
-
122
92
```javascript
123
93
// Sentry initialization should be imported first!
124
94
import"./instrument";
@@ -134,16 +104,8 @@ root.render(<App />);
134
104
135
105
To make sure Sentry captures all your app's errors, configure error handling based on your React version.
136
106
137
-
## Step 3: Capture React Errors
138
-
139
-
To make sure Sentry captures all your app's errors, configure error handling based on your React version.
140
-
141
107
### Configure Error Hooks (React 19+)
142
108
143
-
### Configure Error Hooks (React 19+)
144
-
145
-
The `createRoot` and `hydrateRoot` methods provide error hooks to capture errors automatically. These hooks apply to all React components mounted to the root container.
146
-
Integrate Sentry with these hooks and customize error handling:
147
109
The `createRoot` and `hydrateRoot` methods provide error hooks to capture errors automatically. These hooks apply to all React components mounted to the root container.
148
110
Integrate Sentry with these hooks and customize error handling:
149
111
@@ -248,7 +210,7 @@ To verify that Sentry captures errors and creates issues in your Sentry project,
248
210
<OnboardingOptionoptionId="performance">
249
211
### Tracing
250
212
251
-
To test your tracing configuration, update the previous code snippet by starting a performance trace to measure the time it takes for the execution of your code:
213
+
To test your tracing configuration, update the previous code snippet to start a performance trace to measure the time it takes for the execution of your code:
0 commit comments