function maybeAddParentAttributes(transaction, attributes) {
  if (transaction.parentSpanId) {
    attributes.parentSpanId = transaction.parentSpanId
  }

  if (transaction.parentId) {
    attributes.parentId = transaction.parentId
  }
}
Helper method for modifying attributes by reference if transaction has DT metrics

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