function copyParams({ spec, shim, fn, fnName, args, req }) {
  // Copy over route parameters onto the transaction root.
  const params = shim.agent.config.high_security
    ? null
    : spec.params.call(this, shim, fn, fnName, args, req)

  // Route parameters are handled here, query parameters are handled in lib/transaction/index.js#_markAsWeb as part of finalization
  return shim.prefixRouteParameters(params)
}
Retrieves the parameters from the spec.params
and prefixes them all with `request.parameters.route`

@private
@param {object} params object passed to fn
@param {object} params.spec middleware spec
@param {Shim} params.shim instance of shim
@param {Function} params.fn middleware function
@param {string} params.fnName function name
@param {Array} params.args arguments passed to middleware function
@param {object} params.req request object
@returns {object} parameters object