mapAttributes({ segment, span, transaction, rule }) {
    const excludeAttributes = new Set()
    for (const attribute of rule.attributes) {
      const { key, target, name, highSecurity, regex } = attribute
      let value = extractAttributeValue({ accountId: this.accountId, attribute, excludeAttributes, span })

      if (this.#reconciler.isHostnameKey(key) === true) {
        value = this.#reconciler.resolveHost(value)
      }

      if (regex) {
        processRegex({ segment, transaction, regex, value })
        continue
      }

      if (highSecurity && this.agent.config.high_security === true) {
        this.logger.debug(`Not adding attribute ${key} to ${target} because it gets dropped as part of high_security mode.`)
        continue
      }

      assignToTarget({ target, name, value, segment, transaction, span })
    }

    this.#reconciler.reconcile({ segment, otelSpan: span, excludeAttributes })
  }
Maps attributes from the span to the segment, transaction or trace
based on the transformation rule.
@param {object} params - The parameters for the mapping.
@param {object} params.segment - The segment to add attributes to.
@param {object} params.span - The span to add attributes from.
@param {object} params.transaction - The transaction to add attributes to.
@param {object} params.rule - The transformation rule to use.