function instrumentUndiciFetch(agent) {
  if (agent.config.instrumentation?.undici.enabled === false) {
    logger.warn('Instrumentation for undici/fetch has been disabled via `config.instrumentation.undici.enabled`. Not instrumenting package')
    return
  }

  const undiciPath = path.join(__dirname, 'instrumentation', 'undici.js')
  const undiciShim = shims.createShimFromType({
    type: InstrumentationDescriptor.TYPE_TRANSACTION,
    agent,
    moduleName: 'undici',
    resolvedName: '.'
  })
  _firstPartyInstrumentation(agent, undiciPath, undiciShim)
}
Checks if undici/fetch instrumentation is enabled.
If so, it loads the diagnostics_channel hooks to instrument outbound
undici/fetch calls.
Since this just registers subscriptions to diagnostics_channel events from undici,
we register this as core and it'll work for both fetch and undici

@param {Agent} agent the agent instance