code: func StartSpan(r *http.Request, operationName string, spanKind ext.SpanKindEnum, opts ...opentracing.StartSpanOption) (opentracing.Span, *http.Request, func()) {
  	span, ctx := opentracing.StartSpanFromContext(r.Context(), operationName, opts...)
  
  	switch spanKind {
  	case ext.SpanKindRPCClientEnum:
  		ext.SpanKindRPCClient.Set(span)
  	case ext.SpanKindRPCServerEnum:
  		ext.SpanKindRPCServer.Set(span)
  	case ext.SpanKindProducerEnum:
  		ext.SpanKindProducer.Set(span)
  	case ext.SpanKindConsumerEnum:
  		ext.SpanKindConsumer.Set(span)
  	default:
  		// noop
  	}
  
  	r = r.WithContext(ctx)
  	return span, r, func() {
  		span.Finish()
  	}
  }
docs: // StartSpan starts a new span from the one in the request context