mirror of
https://github.com/caddyserver/caddy.git
synced 2025-11-11 17:16:58 -05:00
fix: correct to span_id
This commit is contained in:
parent
e35ce3d005
commit
bb450ed304
@ -92,7 +92,7 @@ func (ot *openTelemetryWrapper) serveHTTP(w http.ResponseWriter, r *http.Request
|
||||
// Add a trace_id placeholder, accessible via `{http.vars.trace_id}`.
|
||||
caddyhttp.SetVar(ctx, "trace_id", traceID)
|
||||
// Add a span_id placeholder, accessible via `{http.vars.span_id}`.
|
||||
caddyhttp.SetVar(ctx, "span_ud", spanID)
|
||||
caddyhttp.SetVar(ctx, "span_id", spanID)
|
||||
// Add the trace id to the log fields for the request.
|
||||
if extra, ok := ctx.Value(caddyhttp.ExtraLogFieldsCtxKey).(*caddyhttp.ExtraLogFields); ok {
|
||||
extra.Add(zap.String("traceID", traceID))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user