-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tunnel only as a fallback on network errors #9476
Comments
Hi, thanks for the idea! I like it. Thoughts:
I don't think this is a priority for us at the moment so I'll backlog it. We may get to it one day or somebody contributes a good solution. |
Don't think adblockers are detectable per se, happy to always fall back on any network error. Can you share a link or example for a custom transport? |
@mbrevda You can take our fetch transport as an example: sentry-javascript/packages/browser/src/transports/fetch.ts Lines 12 to 15 in b781d51
|
It seems there is different internal handling when a tunnel is used (for example, when creating the envelope). Is a custom transport all that's needed here? |
You're right, the tunnel option will put the client key inside the payload as opposed to the query param. I guess you could forward the client key with a mechanism like headers and the tunnel server adds it back as a query param. |
seems like lots of work for userland - seems like it be much simpler to just allow fallback to tunnel on network error (or based on a predicted function) |
I agree. It's the usual factors that are the reason why it is not implemented like this already: Complexity, Bundle Size, Development & Maintenance Efforts. |
We'll be doing this as part of #14248 - closing this issue so we can track it there instead. |
Problem Statement
It would be great if
tunnel
was used as a fallback in the case of a detected network error and not the default. This would conserve lots of bandwidth on high-volume sites by not sending all requesters unnecessarily.Solution Brainstorm
It might be possible to parse the dsn and place a test call to the sentry API to test but it seems like something that could be easily incorporated in the SDK and should be a development concern.
The text was updated successfully, but these errors were encountered: