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
docs(js): Add tunneling to existing quick start guides (#13803)
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->
## DESCRIBE YOUR PR
Added a step on tunneling to our existing (relevant) quick start guides:
- Angular (manual, wizard)
- React (manual)
- Nuxt (manual, wizard)
- Svelte (manual)
- Sveltekit (manual, wizard)
- Remix (wizard)
Closes: #13713
## IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+
## SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!
## PRE-MERGE CHECKLIST
*Make sure you've checked the following before merging your changes:*
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
## EXTRA RESOURCES
- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
If you haven't tested your Sentry configuration yet, let's do it now. You can confirm that the Sentry SDK is sending data to your Sentry project by using the example component created by the installation wizard:
Copy file name to clipboardExpand all lines: docs/platforms/javascript/guides/angular/manual-setup.mdx
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,6 @@ description: "Learn how to set up the Sentry Angular SDK manually."
9
9
installer](/platforms/javascript/guides/angular).
10
10
</Alert>
11
11
12
-
13
12
If you can't (or prefer not to) use the installation wizard, follow the instructions below to configure the Sentry Angular SDK in your application. This guide is also useful to adjust the pre-set configuration if you used the installation wizard for automatic setup.
14
13
15
14
## Prerequisites
@@ -24,7 +23,9 @@ You need:
24
23
25
24
Choose the features you want to configure, and this guide will show you how:
<Expandabletitle="Which SDK version should you use with your Angular version?"permalink="true"level="warning">
46
47
47
-
48
48
In its current major version, the Sentry Angular SDK supports Angular 14 and newer.
49
49
50
50
If you're using an older version of Angular, you also need to use an older version of the SDK. See the table below for compatibility guidance:
@@ -187,7 +187,6 @@ platformBrowserDynamic()
187
187
188
188
### Register Sentry Providers
189
189
190
-
191
190
The Sentry Angular SDK exports a couple of Angular providers that are necessary to fully instrument your application. We recommend registering them in your `app.config.ts` or main `app.module.ts`:
@@ -284,6 +283,7 @@ import * as Sentry from "@sentry/angular";
284
283
})
285
284
exportclassAppModule {}
286
285
```
286
+
287
287
<Alert>
288
288
289
289
If your Angular app is configured for SSR, make sure that the Sentry providers are not accidentally passed to the SSR config (`app.config.server.ts`). The Sentry Angular SDK can only be used in the browser.
@@ -315,15 +315,18 @@ export class AppModule {
315
315
316
316
Alternatively, take a look at our <PlatformLinkto="/sourcemaps">Uploading Source Maps</PlatformLink> docs
317
317
318
-
## Step 4: Verify
318
+
## Step 4: Avoid Ad Blockers With Tunneling (Optional)
Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
321
325
322
326
### Issues
323
327
324
328
To verify that Sentry captures errors and creates issues in your Sentry project, add the following test button to one of your components (e.g. `app.component.ts`), which will trigger an error that Sentry will capture when you click it:
If you haven't tested your Sentry configuration yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page created by the installation wizard.
The `hidden` option enables source map generation while preventing source map reference comments that would normally appear at the end of each generated file in the build output.
227
227
228
-
## Step 4: Verify Your Setup
228
+
## Step 4: Avoid Ad Blockers With Tunneling (Optional)
If you haven't tested your Sentry configuration yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page created by the installation wizard:
42
46
43
-
1. Open the example page `/sentry-example-page`in your browser. For most Remix applications, this will be at localhost.
47
+
1. Open the example page `/sentry-example-page`in your browser. For most Remix applications, this will be at localhost.
44
48
2. Click the "Throw Sample Error" button to trigger a frontend error and trace.
If you haven't tested your Sentry configuration yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page and route created by the installation wizard:
Copy file name to clipboardExpand all lines: docs/platforms/javascript/guides/sveltekit/manual-setup.mdx
+1-12Lines changed: 1 addition & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -403,18 +403,7 @@ Follow this guide to [configure Sentry for Cloudflare](/platforms/javascript/gui
403
403
404
404
## Step 5: Avoid Ad Blockers With Tunneling (Optional)
405
405
406
-
You can prevent ad blockers from blocking Sentry events using tunneling. Use the `tunnel` option to add an API endpoint in your application that forwards Sentry events to Sentry servers.
407
-
408
-
Update `Sentry.init` in your `hooks.client.(js|ts)` file with the following option:
409
-
410
-
```javascript {filename:hooks.client.(js|ts)}
411
-
Sentry.init({
412
-
dsn:"___PUBLIC_DSN___",,
413
-
tunnel:"/tunnel",
414
-
});
415
-
```
416
-
417
-
This will send all events to the `tunnel` endpoint. However, the events need to be parsed and redirected to Sentry, so you need to do additional configuration on the server. You can find a detailed explanation on how to do this on our [Troubleshooting page](/platforms/javascript/guides/sveltekit/troubleshooting/#using-the-tunnel-option).
You can prevent ad blockers from blocking Sentry events using tunneling. Use the `tunnel` option to add an API endpoint in your application that forwards Sentry events to Sentry servers.
2
+
3
+
To enable tunneling, update `Sentry.init` with the following option:
4
+
5
+
```javascript {3}
6
+
Sentry.init({
7
+
dsn:"___PUBLIC_DSN___",,
8
+
tunnel:"/tunnel",
9
+
});
10
+
```
11
+
12
+
This will send all events to the `tunnel` endpoint. However, the events need to be parsed and redirected to Sentry, so you'll need to do additional configuration on the server. You can find a detailed explanation on how to do this on our <PlatformLinkto="/troubleshooting/#using-the-tunnel-option"> Troubleshooting page</PlatformLink>.
0 commit comments