function overrideDsn(envelope, dsn) {
  return utils.createEnvelope(
    dsn
      ? {
          ...envelope[0],
          dsn,
        }
      : envelope[0],
    envelope[1],
  );
}
Creates a transport that can send events to different DSNs depending on the envelope contents.