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
Copy file name to clipboardExpand all lines: platform-includes/getting-started-config/javascript.astro.mdx
+57-3Lines changed: 57 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
-
Get started by adding your DSN to your Astro config file (`astro.config.mjs`):
1
+
To set up the Sentry SDK, register the Sentry integration and initialize the SDK for client and server in the root directory of your project:
2
+
3
+
### Astro Integration Setup
2
4
3
5
4
6
```javascript {filename:astro.config.mjs}
@@ -8,7 +10,6 @@ import sentry from "@sentry/astro";
8
10
exportdefaultdefineConfig({
9
11
integrations: [
10
12
sentry({
11
-
dsn:"___PUBLIC_DSN___",
12
13
sourceMapsUploadOptions: {
13
14
project:"___PROJECT_SLUG___",
14
15
authToken:process.env.SENTRY_AUTH_TOKEN,
@@ -18,4 +19,57 @@ export default defineConfig({
18
19
});
19
20
```
20
21
21
-
Once you've added your `dsn`, the SDK will automatically capture and send errors and performance events to Sentry.
22
+
<Alertlevel="warning">
23
+
Passing runtime-specific configuration options (`dsn`, `release`, `environment`, `sampleRate`, `tracesSampleRate`, `replaysSessionSampleRate`, `replaysOnErrorSampleRate`) to the Sentry integration will be deprecated in future versions.
24
+
We recommend passing your configuration directly to the respective `Sentry.init()` calls in `sentry.client.config.js` and `sentry.server.config.js` instead.
0 commit comments