sentry-docs icon indicating copy to clipboard operation
sentry-docs copied to clipboard

Add more tunnel option examples for the JavaScript SDK

Open AbhiPrasad opened this issue 4 years ago • 2 comments

Core or SDK?

Platform/SDK

Which part? Which one?

JavaScript SDK

Description

https://docs.sentry.io/platforms/javascript/troubleshooting/#using-the-tunnel-option

We have a tunnel option exposed in the SDK to help users deal with ad-blockers. There are some improvements we can make to the documentation around this.

Suggested Solution

  1. We should create more server-side code examples (currently we only have PHP and dotnet).
  • Tim has a great snippet using cloudflare workers (JS): https://gist.github.com/timfish/a69dd7457b8d6d97c0a8018675be6c23
  • Vladan did the same for NextJS: https://gist.github.com/vladanpaunovic/5ae6ef04ff5473dbf8ebbd82e01e67aa
  • A Python and Ruby example + both of the JS ones above probably bring us to a good place
  1. We should also think about moving it outside the troubleshooting section so it is visible to more users. Open to feedback around this.

AbhiPrasad avatar Jul 15 '21 20:07 AbhiPrasad

Also note that there's a link to the examples doc:

image

Which we can add more examples and includes an easy to run JS example consuming the tunnel:

https://github.com/getsentry/examples/tree/master/tunneling

bruno-garcia avatar Jul 15 '21 21:07 bruno-garcia

We do have a ruby snippet, but it's formatted weirdly (see https://github.com/getsentry/sentry-docs/issues/5281). And yes, agree we need a Python example.

lobsterkatie avatar Jul 26 '22 18:07 lobsterkatie