1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-23 11:14:48 +02:00

Fix HTTP status when OTel is enabled

This commit is contained in:
DarthSim 2022-10-18 20:01:10 +06:00
parent 296d2db8cf
commit 9aa658b758

View File

@ -334,6 +334,8 @@ func StartRootSpan(ctx context.Context, rw http.ResponseWriter, r *http.Request)
spanStatus, spanMessage := semconv.SpanStatusFromHTTPStatusCodeAndSpanKind(statusCode, trace.SpanKindServer)
span.SetAttributes(attrs...)
span.SetStatus(spanStatus, spanMessage)
next(statusCode)
}
},
})