re-inject propagator header

Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
Mohammed Al Sahaf 2025-08-30 03:19:41 +03:00
parent 1aac622b1b
commit 1c7d0e296b
No known key found for this signature in database

View File

@ -86,7 +86,7 @@ func newOpenTelemetryWrapper(ctx context.Context, spanName string, injectServerT
// serveHTTP injects a tracing context and call the next handler.
func (ot *openTelemetryWrapper) serveHTTP(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
ot.propagators.Inject(ctx, propagation.HeaderCarrier(r.Header))
spanCtx := trace.SpanContextFromContext(ctx)
if spanCtx.IsValid() {
traceID := spanCtx.TraceID().String()