[WIP] support inject exit context in tracing#2106
Closed
dengqian wants to merge 1 commit intomosn:masterfrom
Closed
[WIP] support inject exit context in tracing#2106dengqian wants to merge 1 commit intomosn:masterfrom
dengqian wants to merge 1 commit intomosn:masterfrom
Conversation
nejisama
reviewed
Aug 9, 2022
| // if trace.IsEnabled() { | ||
| // span := trace.SpanFromContext(s.context) | ||
| // if span != nil { | ||
| // span.InjectExitContext(headers, s.requestInfo) |
Contributor
There was a problem hiding this comment.
response 不同于request, response 可能有多次(比如重试等),也可能有并发问题(超时Reset 和 收到响应并发),如果在这里搞trace的Inject的话 可能都会对数据准确性有影响
Contributor
Author
There was a problem hiding this comment.
response 不同于request, response 可能有多次(比如重试等),也可能有并发问题(超时Reset 和 收到响应并发),如果在这里搞trace的Inject的话 可能都会对数据准确性有影响
这里inject主要是可能需要注入响应头或者对上游发送的tracing相关的响应头做修改,这类的修改不能在发送请求结束之后finishTracing的地方做,功能上和FinishSpan区分,所以重试或者并发的情况和发送请求时的注入类似
Contributor
There was a problem hiding this comment.
- 请求没有重入的问题,而这里可能有重入的问题。
- 对于Reset等场景来说,可能走不到onUpstreamHeaders 这个地方,这样就会导致这部分能力是缺失的
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In some tracing strategies, infos in response headers will be needed.
depend on mosn/api#49