onEnd(span) {
    if (span[otelSynthesis] && span[otelSynthesis].segment) {
      const { segment, transaction, rule } = span[otelSynthesis]
      this.updateDuration(segment, span)
      this.handleError({ segment, transaction, span })
      this.reconcileAttributes({ segment, span, transaction, rule })
      delete span[otelSynthesis]
    }
  }
Update the segment duration from span, handle errors and
map and reconcile any attributes that were to span.
@param {object} span otel span getting updated