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
You can also define these values as environment variables in e.g. a `.env` file
73
-
or in you CI configuration:
53
+
Follow [this guide](https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens) to create an auth token and add it to your environment variables:
74
54
75
-
```sh
76
-
SENTRY_PROJECT="your-project"
55
+
```bash
77
56
SENTRY_AUTH_TOKEN="your-token"
78
57
```
79
58
80
-
Follow [this guide](https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens) to create an auth token.
81
-
82
-
### 3. [Optional] Advanced Configuration
83
-
84
-
To fully customize and configure Sentry in an Astro project, follow step 1 and in addition,
85
-
add a `sentry.client.config.(js|ts)` and `sentry.server.config(js|ts)` file to the root directory of your project.
86
-
Inside these files, you can call `Sentry.init()` and use the full range of Sentry options.
87
-
88
-
Configuring the client SDK:
89
-
90
-
```js
91
-
// sentry.client.config.ts or sentry.server.config.ts
92
-
import*asSentryfrom"@sentry/astro";
93
-
94
-
Sentry.init({
95
-
dsn:"__DSN__",
96
-
beforeSend(event) {
97
-
console.log("Sending event on the client");
98
-
returnevent;
99
-
},
100
-
tracesSampler: () => {/* ... */}
101
-
});
102
-
```
103
-
104
-
**Important**: Once you created a sentry config file, the SDK options passed to `sentryAstro` will be ignored for the respective runtime. You can also only define create of the two files.
105
-
106
-
#### 3.1 Custom file location
59
+
## Configuration
107
60
108
-
If you want to move the `sentry.*.config` files to another location,
109
-
you can specify the file path, relative to the project root, in `sentryAstro`:
61
+
Check out our docs for configuring your SDK setup:
0 commit comments