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
app.use(Sentry.Handlers.errorHandler() as express.ErrorRequestHandler);
57
58
```
59
+
60
+
## Working with Scopes and Hubs
61
+
62
+
Because of pipeline-like nature of Express.js and it's middlewares, the user has to pass the scope through all the pipes and carry it over with the request. It's required in order to isolate requests from each other.
63
+
64
+
If you want to set per-requests user data and send it over to Sentry, you need to use `getHubFromCarrier` on the `request` object, instead of directly calling methods like `configureScope` or `captureException`. Here are some examples:
All `configureScope` calls that were done directly on initialized `Sentry` object, will be carried to each request, so it's a good way to set some data globally.
0 commit comments