function Shim(agent, moduleName, resolvedName, shimName, pkgVersion) {
  if (!agent || !moduleName) {
    throw new Error('Shim must be initialized with an agent and module name.')
  }

  this._logger = logger.child({ module: moduleName })
  this._agent = agent
  this._toExport = null
  this._debug = false
  this.defineProperty(this, 'moduleName', moduleName)
  this.assignId(shimName)
  this.pkgVersion = pkgVersion

  // Used in `shim.require`
  // If this is a built-in the root is set as `.`
  this._moduleRoot = isBuiltin(resolvedName || moduleName) ? '.' : resolvedName
}
Constructs a shim associated with the given agent instance.

@class
@classdesc A helper class for wrapping modules with segments.
@param {Agent}   agent         - The agent this shim will use.
@param {string}  moduleName    - The name of the module being instrumented.
@param {string}  resolvedName  - The full path to the loaded module.
@param {string}  shimName      - Used to persist shim ids across different instances. This is
@param {string} pkgVersion     - version of package getting instrumented
applicable to instrument that compliments each other across libraries(i.e - koa + koa-route/koa-router)