Skip to content

Use tunnel transport rather than top level tunnel option #14152

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.

Activity

  1. changed the title [-]Use tunnel transport rather than top level tunnel option[/-] [+]Use `tunnel` transport rather than top level `tunnel` option[/+] on Oct 31, 2024
  2. added this to the milestone on Nov 1, 2024
  3. removed this from the 9.0.0 milestone on Nov 13, 2024
  4. AbhiPrasad commented on Dec 11, 2024

    @AbhiPrasad
    Contributor

    I think as per discussions we're actually going to do an integration (with some new hooks) to make this work.

    Going to close this so that #14248 becomes the sole source of truth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions