Skip to content

router: record upstream request timeout stats for all the cases - #20072

Merged
mattklein123 merged 9 commits into
envoyproxy:mainfrom
agrawroh:upstream-rq-timeout-stats
Feb 23, 2022
Merged

mattklein123 merged 9 commits into
envoyproxy:mainfrom
agrawroh:upstream-rq-timeout-stats

Conversation

@agrawroh

@agrawroh agrawroh commented Feb 22, 2022 •

Copy link
Copy Markdown
Member

This PR extends the emission of cluster/vcluster level timeout stats upon the upstream requests timeout behind a runtime guard called do_not_await_headers_on_upstream_timeout_to_emit_stats which is set as true by default.

Commit Message: Record upstream request timeouts for all the cases and not just for those requests which are awaiting headers.
Additional Description: We want to record the upstream timeouts and increase the stats counters in all the cases. For example, we also want to record the stats in the case of BiDi streaming APIs where we might have already seen the headers. If desired, the old behavior to not do any work for those upstream requests we've already seen the headers for can be achieved by overloading the runtime guard do_not_await_headers_on_upstream_timeout_to_emit_stats as false.
(Fixes #19829)
Risk Level: Low
Testing: Added Unit Test
Docs Changes: N/A
Release Notes: Added description regarding the minor behavior change and the runtime guard do_not_await_headers_on_upstream_timeout_to_emit_stats in the docs.
Platform Specific Features: N/A

Signed-off-by: Rohit Agrawal [email protected]

…st for those requests which are awaiting headers

Signed-off-by: Rohit Agrawal <[email protected]>
@agrawroh

Copy link
Copy Markdown
Member Author

@mattklein123 Whenever you get some free time, could you please have a look at this one? You probably have some context on #19829

Signed-off-by: Rohit Agrawal <[email protected]>
@mattklein123 mattklein123 self-assigned this Feb 22, 2022

@mattklein123 mattklein123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This generally looks fine to me, with one comment about the scope of the change. This will also need tests. Thank you.

/wait

Comment thread source/common/router/router.cc Resolved

@mattklein123 mattklein123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/wait

Comment thread test/common/router/router_test.cc Resolved
Comment thread test/common/router/router_test.cc Resolved
mattklein123
mattklein123 previously approved these changes Feb 22, 2022

@mattklein123 mattklein123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

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.

Request timeout metric not getting emitted for chunked responses

2 participants