code: func FinishWithError(span opentracing.Span, err error) {
  	if err != nil {
  		fields := []log.Field{
  			log.String("event", "error"),
  			log.String("message", err.Error()),
  		}
  		if _, ok := err.(interface {
  			Cause() error
  		}); ok {
  			fields = append(fields, log.String("stack", fmt.Sprintf("%+v", err)))
  		}
  		span.LogFields(fields...)
  		ext.Error.Set(span, true)
  	}
  	span.Finish()
  }
docs: // FinishWithError finalizes the span and sets the error if one is passed