Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update x-envoy-upstream-service-time description to be more accurate #12517

Merged
merged 4 commits into from
Aug 7, 2020

Conversation

wbpcode
Copy link
Member

@wbpcode wbpcode commented Aug 6, 2020

Commit Message: Update docs of x-envoy-upstream-service-time.

From the source code, x-envoy-upstream-service-time includes the latency of the network from envoy to upstream host and the time cost of upstream host generating responses. But the description in the docs is ambiguous and may lead to confusion in understanding it. Relevant: #12437.

if (DateUtil::timePointValid(downstream_request_complete_time_)) {
Event::Dispatcher& dispatcher = callbacks_->dispatcher();
MonotonicTime response_received_time = dispatcher.timeSource().monotonicTime();
std::chrono::milliseconds ms = std::chrono::duration_cast<std::chrono::milliseconds>(
response_received_time - downstream_request_complete_time_);
if (!config_.suppress_envoy_headers_) {
headers->setEnvoyUpstreamServiceTime(ms.count());
}
}

Risk Level: N/A
Testing: N/A
Docs Changes: Docs only
Release Notes: N/A

Signed-off-by: wbpcode comems@msn.com

wbpcode added 2 commits August 6, 2020 19:44
Signed-off-by: wbpcode <comems@msn.com>
Signed-off-by: wbpcode <comems@msn.com>
@dio dio changed the title make docs of x-envoy-upstream-service-time more accurate docs: Update x-envoy-upstream-service-time description to be more accurate Aug 6, 2020
dio
dio previously approved these changes Aug 6, 2020
Copy link
Member

@dio dio left a comment

Choose a reason for hiding this comment

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

Thanks!

Comment on lines 363 to 364
Contains the time in milliseconds spent by the upstream host processing the request and the network
latency between Envoy and upstream host. This is useful if the client wants to determine service time
Copy link
Member

Choose a reason for hiding this comment

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

Superfluous spaces? Probably setting your editor to trim empty spaces will be helpful.

Signed-off-by: wbpcode <comems@msn.com>
@wbpcode
Copy link
Member Author

wbpcode commented Aug 7, 2020

/retest

@repokitteh-read-only
Copy link

🤷‍♀️ nothing to rebuild.

🐱

Caused by: a #12517 (comment) was created by @wbpcode.

see: more, trace.

Signed-off-by: wbpcode <comems@msn.com>
@wbpcode
Copy link
Member Author

wbpcode commented Aug 7, 2020

It's ok now.

@mattklein123 mattklein123 merged commit e0bd398 into envoyproxy:master Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants