Tracing: Fix OpenTelemetry Jaeger context propagation (#53269) (#53724)

* fix otel jaeger context propagation

* add back launch.json

* add back launch.json

(cherry picked from commit 806fb8ab7a)

Co-authored-by: zhichli <57812115+zhichli@users.noreply.github.com>
This commit is contained in:
idafurjes
2022-08-15 10:47:08 +02:00
committed by GitHub
co-authored by zhichli
parent 98a36f4005
commit b4a0c0458a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ func RequestTracing(tracer tracing.Tracer) web.Handler {
rw := res.(web.ResponseWriter)
wireContext := otel.GetTextMapPropagator().Extract(req.Context(), propagation.HeaderCarrier(req.Header))
ctx, span := tracer.Start(req.Context(), fmt.Sprintf("HTTP %s %s", req.Method, req.URL.Path), trace.WithLinks(trace.LinkFromContext(wireContext)))
ctx, span := tracer.Start(wireContext, fmt.Sprintf("HTTP %s %s", req.Method, req.URL.Path), trace.WithLinks(trace.LinkFromContext(wireContext)))
c.Req = req.WithContext(ctx)
c.Next()