Skip to content

MultiTransport with version 7.x #7420

Closed Answered by AbhiPrasad
ZMDominik asked this question in Q&A
Discussion options

You must be logged in to vote

I created this in an attempt to make multi transport work, but it's not even sending errors to one of the dsn

The issue with the first approach is that you have to convert the DSN to be a URL to send to. You can do this via the makeDsn and getEnvelopeEndpointWithUrlEncodedAuth that is exported from the base packages.

const dsn = makeDsn("STRING DSN HERE");
const url = getEnvelopeEndpointWithUrlEncodedAuth(dsn);

Below is an example that should work - but I haven't tested it. Pay special attention to the fact that it respects rate limits, which is important.

/**
 * Creates a Transport that uses the Fetch API to send events to multiple Sentry DSNs.
 */
export function makeMultiTransport(op…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@AbhiPrasad
Comment options

@ZMDominik
Comment options

Comment options

You must be logged in to vote
5 replies
@ZMDominik
Comment options

@AbhiPrasad
Comment options

@ZMDominik
Comment options

@ZMDominik
Comment options

@AbhiPrasad
Comment options

Answer selected by ZMDominik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants