-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Open
Labels
help wanted 🆘Extra attention is neededExtra attention is needed
Description
Hello,
I'm trying to use the trace directive, but it's doing less than it should.
Eg:
:8081 {
handle /hello {
tracing {
span app
}
respond 200 "hi"
}
}
Looking at the spec for open telemetry traceparent
header: https://www.w3.org/TR/trace-context/#traceparent-header
I'd expect:
- generate a new traceparent if not present in the incoming request (it does!)
- use the incoming traceparent header and create a new span id (it does!)
- the
traceparent
header is returned in the http response (it does not)
So, using caddy as the front gateway, I do no receive a traceparent, but it does not send a traceparent header to backends behind.
The workaround is to write that header myself for each handler, hard-coding the flag:
:8081 {
handle /hello {
tracing {
span app
}
header traceparent 00-{http.vars.trace_id}-{http.vars.span_id}-01
respond 200 "hi"
}
}
I'd expect tracing
to automatically set the traceparent
header in the header (to have it in the response, or to have it in the request sent via reverse_proxy)
Metadata
Metadata
Assignees
Labels
help wanted 🆘Extra attention is neededExtra attention is needed