Skip to content

Conversation

@dengqian
Copy link
Contributor

@dengqian dengqian commented Aug 8, 2022

In some tracing strategies, infos in response headers will be needed.
depend on mosn/api#49

// if trace.IsEnabled() {
// span := trace.SpanFromContext(s.context)
// if span != nil {
// span.InjectExitContext(headers, s.requestInfo)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

response 不同于request, response 可能有多次(比如重试等),也可能有并发问题(超时Reset 和 收到响应并发),如果在这里搞trace的Inject的话 可能都会对数据准确性有影响

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

response 不同于request, response 可能有多次(比如重试等),也可能有并发问题(超时Reset 和 收到响应并发),如果在这里搞trace的Inject的话 可能都会对数据准确性有影响

这里inject主要是可能需要注入响应头或者对上游发送的tracing相关的响应头做修改,这类的修改不能在发送请求结束之后finishTracing的地方做,功能上和FinishSpan区分,所以重试或者并发的情况和发送请求时的注入类似

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 请求没有重入的问题,而这里可能有重入的问题。
  2. 对于Reset等场景来说,可能走不到onUpstreamHeaders 这个地方,这样就会导致这部分能力是缺失的

@taoyuanyuan taoyuanyuan added this to the 1.2.0 milestone Aug 11, 2022
@taoyuanyuan taoyuanyuan modified the milestones: 1.2.0, 1.3.0 Oct 25, 2022
@dengqian dengqian closed this Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants