fix: dont inject twice

This commit is contained in:
Cedric Ziel 2024-06-22 19:00:23 +02:00
parent ed087ecdfd
commit ae1d4ef05c

View File

@ -84,7 +84,6 @@ func newOpenTelemetryWrapper(ctx context.Context, spanName string, injectServerT
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()