Problem Statement
Currently to use the tunnel option, you pass it in the top level init options:
Sentry.init({
dsn: '__DSN__',
tunnel: '/sentry-tunnel',
})
But this means that the tunnel value gets passed around throughout the code-base because it is required for every different type of envelope creation.
Solution Brainstorm
Use a transport instead:
Sentry.init({
dsn: '__DSN__',
transport: Sentry.tunnel('/sentry-tunnel'),
});
The tunnel transport would wrap the default transport for that SDK and inject the DSN into the envelope headers and override the URL.
Problem Statement
Currently to use the tunnel option, you pass it in the top level init options:
But this means that the
tunnelvalue gets passed around throughout the code-base because it is required for every different type of envelope creation.Solution Brainstorm
Use a transport instead:
The
tunneltransport would wrap the default transport for that SDK and inject the DSN into the envelope headers and override the URL.