code: func (t *tracker) finishWithError(err error, noDebugStack bool) {
  	if t.span == nil {
  		return
  	}
  
  	statusCode := codes.OK
  	finishOptions := []tracer.FinishOption{
  		tracer.FinishTime(time.Now()),
  	}
  
  	microErr, ok := err.(*microerr.Error)
  
  	if ok {
  		finishOptions = append(finishOptions, tracer.WithError(
  			fmt.Errorf("%s: %s", microErr.Id, microErr.Detail),
  		))
  
  		c, ok := microCodeToStatusCode[microErr.Code]
  		if ok {
  			statusCode = c
  		} else {
  			statusCode = codes.Unknown
  		}
  	}
  
  	t.span.SetTag(tagStatus, statusCode.String())
  
  	if noDebugStack {
  		finishOptions = append(finishOptions, tracer.NoDebugStack())
  	}
  
  	t.span.Finish(finishOptions...)
  	t.span = nil
  }
docs: // finishWithError end a request's monitoring session. If there is a span ongoing, it will
  // be ended.