tracing: Add support for including response headers in custom tags
#29,036 建立於 2023年8月16日
倉庫指標
- Star
- (27,997 star)
- PR 合併指標
- (平均合併 8天) (30 天內合併 378 個 PR)
描述
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.