function copySegmentParameters(segment, parameters) {
  for (const key in parameters) {
    if (hasOwnProperty(parameters, key)) {
      segment.addAttribute(key, parameters[key])
    }
  }
}
Copies the given parameters onto the segment, respecting the current agent
configuration.

@memberof Shim.prototype
@param {TraceSegment}  segment     - The segment to copy the parameters onto.
@param {object}        parameters  - The parameters to copy.