function maybeAddExtraCATAttributes(transaction, attributes, configuration) {
  if (transaction.referringPathHash) {
    attributes['nr.referringPathHash'] = transaction.referringPathHash
  }

  if (transaction.referringTransactionGuid) {
    const refId = transaction.referringTransactionGuid
    attributes['nr.referringTransactionGuid'] = refId
  }

  const alternatePathHashes = transaction.alternatePathHashes()
  if (alternatePathHashes) {
    attributes['nr.alternatePathHashes'] = alternatePathHashes
  }

  if (transaction.baseSegment && transaction.type === 'web') {
    const apdex =
      configuration.web_transactions_apdex[transaction.getFullName()] || configuration.apdex_t
    const duration = transaction.baseSegment.getDurationInMillis() / 1000
    attributes['nr.apdexPerfZone'] = calculateApdexZone(duration, apdex)
  }
}
Helper method for modifying attributes by reference if transaction has additional CAT metrics

@param {object} transaction The current transaction
@param {object} attributes The attributes object to modify (by reference)
@param {object} configuration Agent configuration options