function _createSegment({ name, parent, transaction }) {
    return agent.config.feature_flag.promise_segments === true
      ? agent.tracer.createSegment({ name, parent, transaction })
      : parent || agent.tracer.getSegment()
  }
Creates a segment for a given handler in promise chain
if `config.feature_flag.promise_segments` is true
Otherwise it just returns the current if existing or gets the current

@param {object} params to function
@param {string} params.name name of segment to create
@param {TraceSegment} params.parent current parent segment
@param {Transaction} params.transaction active transaction
@returns {TraceSegment} segment