Closed
Conversation
Member
|
Hi @milanboers, thanks for the PR! As you point out, in Java this is harder due to Feel free to create a new PR or update this one by keeping just the changes to |
Contributor
Author
|
@lcian thanks! I'll open a new one with the |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Adds a
MultiplexedTransportFactory(as experimental API) that sends all envelopes to multiple Sentry DSNs (backends or projects).Usage:
This is more or less a port of makeMultiplexedTransport in the Javascript SDK (relevant getsentry/sentry-javascript#7926).
(The Javascript SDK also allows routing events based on the event content. This seems more useful for the microfrontends use case, but it can be added)
Opened a similar PR for Python: getsentry/sentry-python#4256
💡 Motivation and Context
It's a common ask from customers, and there seem to be several issues about it on github/online. Would you consider adding it to the Java SDK, like it is in the Javascript SDK?
For Java in particular, it's harder to make your own Transport to do this (because the authentication is added in
RequestDetailsResolver).getsentry/sentry-python#1484
#620
https://forum.sentry.io/t/java-sdk-multiple-dsns/12715
https://stackoverflow.com/questions/58718196/how-to-have-multiple-global-dsn-in-sentry-sdk-in-python
💚 How did you test it?
Unit tests + tried with a local project
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps