MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / overrideDsn

Function overrideDsn

packages/core/src/transports/multiplexed.ts:74–84  ·  view source on GitHub ↗

Overrides the DSN in the envelope header

(envelope: Envelope, dsn: string)

Source from the content-addressed store, hash-verified

72
73/** Overrides the DSN in the envelope header */
74function overrideDsn(envelope: Envelope, dsn: string): Envelope {
75 return createEnvelope(
76 dsn
77 ? {
78 ...envelope[0],
79 dsn,
80 }
81 : envelope[0],
82 envelope[1],
83 );
84}
85
86/**
87 * Creates a transport that can send events to different DSNs depending on the envelope contents.

Callers 1

sendFunction · 0.85

Calls 1

createEnvelopeFunction · 0.90

Tested by

no test coverage detected