function wrapConfigure({ shim, winstonLogger, agent }) {
  shim.wrap(winstonLogger, 'configure', function nrConfigure(shim, configure) {
    return function wrappedConfigure(...args) {
      const transportsArg = args?.[0]?.transports
      if (this.transports.length) {
        const nrTransport = new NrTransport({ agent })
        args[0].transports = Array.isArray(transportsArg)
          ? [...transportsArg, nrTransport]
          : nrTransport
      }
      return configure.apply(this, args)
    }
  })
}
Wraps logger.configure and checks the transports key in the arguments and adds the NrTransport as
it will get cleared in configure.

@param {object} params object passed to function
@param {object} params.shim shim instance
@param {object} params.winstonLogger instance of logger
@param {object} params.agent NR agent