Closed 10xLaCroixDrinker closed 6 months ago
Hi @10xLaCroixDrinker, this specific implementation would be a little out of scope. We want to stay within the realm of the OpenTelemetry API/spec. An option adding an onSend
hook that propagates trace context to the reply headers would be within scope though (and a welcome addition). I realize that your header is primarily for debugging, but the traceid
would still exist within a propagation header.
// Assuming this is the default `traceparent` propagation header...
const [
version,
traceId,
parentSpanId,
traceFlags,
] = headers.get('traceparent').split('-')
I have this hook I've included in my application that adds the
traceid
as a header in my response, so that traces can be easily looked up for specific requests for debugging (not for propagation). Do you think this is something that would be within the scope of your plugin to include as an option?