Skip to content
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

feat(core): Allow multiplexed transport to send to multiple releases #8559

Merged
merged 2 commits into from
Jul 17, 2023

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Jul 17, 2023

The multiplexed transport can already route events to different or multiple DSNs but we also need to be able to route to specific releases too.

In a page with micro-frontends, it's possible (and probably even quite common) to be using the same dependency multiple times but different versions (ie. different releases). Depending on where an error occurs we might want to send an event to [email protected] or [email protected] at the same DSN.

This PR:

  • Adds a private makeOverrideReleaseTransport which can used to wrap a transport and override the release on all events
  • Modifies makeMultiplexedTransport so it now creates a transport for each unique dsn/release pair
    • And uses makeOverrideReleaseTransport whenever a release is returned from the callback

@timfish timfish marked this pull request as ready for review July 17, 2023 17:13
@AbhiPrasad AbhiPrasad merged commit c2bd091 into getsentry:develop Jul 17, 2023
@timfish timfish deleted the feat/multiplex-override-release branch July 17, 2023 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants