function applySegment({ opts, makeRequest, host, port, hostname, segment, config }) {
  segment.start()
  const request = makeRequest(opts)
  const parsed = urltils.scrubAndParseParameters(request.path)
  parsed.path = urltils.obfuscatePath(config, parsed.path)
  const proto = parsed.protocol || opts.protocol || 'http:'
  segment.name += parsed.path
  segment.captureExternalAttributes({
    protocol: proto,
    hostname,
    host,
    method: opts.method,
    port,
    path: parsed.path,
    queryParams: parsed.parameters
  })
  request[symbols.segment] = segment
  return request
}
Starts the http outbound segment and attaches relevant attributes to the segment/span.

@param {object} params to function
@param {string|object} params.opts a url string or HTTP request options
@param {Function} params.makeRequest function to make request
@param {string} params.host host of outbound request
@param {string} params.port port of outbound request
@param {string} params.hostname host + port of outbound request
@param {TraceSegment} params.segment outbound http segment
@param {object} params.config agent config
@returns {http.IncomingMessage} request actual http outbound request