function trackInstrumentationUsage(agent, shim, moduleName, metricPrefix) {
  try {
    const version = tryGetVersion(shim)
    const instrumentationMetricName = `${metricPrefix}/${moduleName}`

    agent.metrics.getOrCreateMetric(instrumentationMetricName).incrementCallCount()

    if (version) {
      const majorVersion = semver.major(version)
      const versionMetricName = `${instrumentationMetricName}/Version/${majorVersion}`

      agent.metrics.getOrCreateMetric(versionMetricName).incrementCallCount()
    }
  } catch (error) {
    logger.debug('Unable to track instrumentation usage for: ', moduleName, error)
  }
}
Adds metrics to indicate instrumentation was used for a particular module and
what major version the module was at, if possible.

@param {*} agent The agent instance.
@param {*} shim The instance of the shim used to instrument the module.
@param {string} moduleName The name of the required module.
@param {string} metricPrefix Support metric prefix to prepend to the metrics. Will indicate onRequire

from NAMES.FEATURES.INSTRUMENTATION.