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
feat(astro): Automatically add Sentry middleware in Astro integration (#9532)
This change adds automatic registration of our Astro middleware. This is
possible since Astro 3.5.2 by [adding
middleware](https://docs.astro.build/en/reference/integrations-reference/#addmiddleware-option)
entry points in the astro integration's setup hook.
This is backwards compatible with previous Astro versions because we can
simply check if the `addMiddleware` function exists and only make use of
it if it does.
Complete the setup by adding the Sentry middleware to your `src/middleware.js` file:
59
+
### Server Instrumentation
60
+
61
+
For Astro apps configured for (hybrid) Server Side Rendering (SSR), the Sentry integration will automatically add middleware to your server to instrument incoming requests **if you're using Astro 3.5.0 or newer**.
62
+
63
+
If you're using Astro <3.5.0, complete the setup by adding the Sentry middleware to your `src/middleware.js` file:
0 commit comments