Skip to content

Use tunnel transport rather than top level tunnel option #14152

@timfish

Description

@timfish

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions