function requestHeadersHook(shim, { request, response }) {
  const { config } = shim.agent
  const activeSegment = request[symbols.segment]
  const transaction = request[symbols.transaction]
  if (!activeSegment) {
    return
  }

  activeSegment.addSpanAttribute('http.statusCode', response.statusCode)
  activeSegment.addSpanAttribute('http.statusText', response.statusText)

  if (config.cross_application_tracer.enabled && !config.distributed_tracing.enabled) {
    try {
      const { appData } = cat.extractCatHeaders(response.headers)
      const decodedAppData = cat.parseAppData(config, appData)
      const attrs = activeSegment.getAttributes()
      const url = new URL(attrs.url)
      cat.assignCatToSegment({
        appData: decodedAppData,
        segment: activeSegment,
        host: url.host,
        transaction
      })
    } catch (err) {
      logger.warn(err, 'Cannot add CAT data to segment')
    }
  }
}
This event occurs after the response headers have been received.
We will add the relevant http response attributes to active segment.
Also add CAT specific keys to active segment.

@param {Shim} shim instance of shim
@param {object} params object from undici hook
@param {object} params.request undici request object
@param {object} params.response { statusCode, headers, statusText }