Explorar o código

attach context with span to *http.Request

bergquist %!s(int64=8) %!d(string=hai) anos
pai
achega
d55b49b7b7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      pkg/middleware/request_tracing.go

+ 1 - 1
pkg/middleware/request_tracing.go

@@ -22,7 +22,7 @@ func RequestTracing() macaron.Handler {
 		defer span.Finish()
 
 		ctx := opentracing.ContextWithSpan(req.Context(), span)
-		req = req.WithContext(ctx)
+		c.Req.Request = req.WithContext(ctx)
 
 		c.Next()