Pierre-Lannoy / wp-decalog

Capture and log events, metrics and traces on your site. Make WordPress observable - finally!
https://perfops.one/
GNU General Public License v3.0
64 stars 8 forks source link

HTTP headers for propagating trace and span context #49

Open stevapple opened 1 year ago

stevapple commented 1 year ago

Is your feature request related to a problem? Please describe. Trace and span context can be propagated through HTTP header(s). W3C has a recommended standard compatible with OpenTelemetry, while older Jaeger-compatible clients are using Uber's original format. If possible, we should support both:)

Describe the solution you'd like Parse the HTTP headers accordingly and, if the content is valid, propagate the trace by overriding the default settings (trace id/parent span id/sampled/...).

Describe alternatives you've considered Simply ignore it like what we're doing now. The full semantics is rather complex, so it may not worth the effort.

Additional context https://www.w3.org/TR/trace-context-1/#trace-context-http-headers-format https://www.jaegertracing.io/docs/1.22/client-libraries/#tracespan-identity

Pierre-Lannoy commented 1 year ago

Hi @stevapple and thanks for this suggestion. From my point of view, it could be done (and it's an interesting point) based on the W3C recommandation. Nevertheless I am a bit more sceptical about the Jaeger format… Let me think about it. There is also one thing I don't quite understand about the W3C recommendations: do you see something about "trace poisoning"?