addSegment({ segment, transaction, parentId, isRoot }) {
    // Check if the priority would be accepted before creating the event object.

    if (transaction.priority < this._items.getMinimumPriority()) {
      ++this.events.seen
      this._metrics.getOrCreateMetric(this._metricNames.SEEN).incrementCallCount()

      return false
    }
    const span = SpanEvent.fromSegment(segment, transaction, parentId || null, isRoot)
    return this.add(span, transaction.priority)
  }
Attempts to add the given segment to the collection.

@param {object} params to function
@param {TraceSegment} params.segment segment to add.
@param {Transaction} params.transaction active transaction
@param {string} [params.parentId] GUID of the parent span.
@param {boolean} params.isRoot if segment is root segment
@returns {boolean} True if the segment was added, or false if it was discarded.