tracing: Add support for including response headers in custom tags
#29.036 geöffnet am 16. Aug. 2023
Repository-Metriken
- Stars
- (27.997 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 8T) (378 gemergte PRs in 30 T)
Beschreibung
At the moment, it's possible to specify custom tags in the HTTP connection manager, but the only kinds of custom tag are literal, environment, request_header, and metadata.
I'd like to be able to include some data from response headers in spans. My rough understanding of the control flow is that the tags are only added to the span when it's finalized, ie, after the downstream response has been sent. I believe this means the headers should be available, and it's a matter of adding the config and plumbing to make it work.
There should probably be both upstream and downstream response headers, since it's possible to use upstream headers to signal things to envoy but then strip those from the downstream response, or to add extra headers to the downstream response that aren't present on the upstream response.