function assignToTarget({ segment, target, transaction, name, value }) {
  if (target === 'transaction') {
    transaction[name] = value
  } else if (target === 'trace') {
    transaction.trace.attributes.addAttribute(DESTINATIONS.TRANS_COMMON, name, value)
  } else if (target === 'segment') {
    segment.addAttribute(name, value)
  }
}
Assigns a value to a target based on the specified target type.
@param {Object} params - The parameters for assigning the value.
@param {Object} params.segment - The segment to add the attribute to.
@param {string} params.target - The target type ('transaction', 'trace', or 'segment').
@param {Object} params.transaction - The transaction object.
@param {string} params.name - The name of the attribute.
@param {string} params.value - The value of the attribute.