mirror of
https://github.com/caddyserver/caddy.git
synced 2025-11-11 09:06:56 -05:00
re-inject propagator header
Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
parent
1aac622b1b
commit
1c7d0e296b
@ -86,7 +86,7 @@ func newOpenTelemetryWrapper(ctx context.Context, spanName string, injectServerT
|
|||||||
// serveHTTP injects a tracing context and call the next handler.
|
// serveHTTP injects a tracing context and call the next handler.
|
||||||
func (ot *openTelemetryWrapper) serveHTTP(w http.ResponseWriter, r *http.Request) {
|
func (ot *openTelemetryWrapper) serveHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
|
ot.propagators.Inject(ctx, propagation.HeaderCarrier(r.Header))
|
||||||
spanCtx := trace.SpanContextFromContext(ctx)
|
spanCtx := trace.SpanContextFromContext(ctx)
|
||||||
if spanCtx.IsValid() {
|
if spanCtx.IsValid() {
|
||||||
traceID := spanCtx.TraceID().String()
|
traceID := spanCtx.TraceID().String()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user