Skip to content

access_log: added new access_log command operator %UPSTREAM_REQUEST_ATTEMPT_COUNT% to retrieve the number of times given request got attempted upstream - #19150

Merged
ggreenway merged 3 commits into
envoyproxy:mainfrom
agrawroh:upstream-rq-attempt-count
Dec 1, 2021

Conversation

@agrawroh

@agrawroh agrawroh commented Dec 1, 2021 •

Copy link
Copy Markdown
Member

This PR adds a new command operator in the access logs called %UPSTREAM_REQUEST_ATTEMPT_COUNT% which can be used to retrieve the number of times given request got attempted upstream.

This could be very helpful to triage the slow requests due to the retry. [See]

Commit Message: Added new access_log command operator %UPSTREAM_REQUEST_ATTEMPT_COUNT% to retrieve the number of times given request got attempted upstream
Additional Description: Adds a new command operator called %UPSTREAM_REQUEST_ATTEMPT_COUNT% in the access logs which can be used to retrieve the number of times given request got attempted upstream. (Fixes #18870)
Risk Level: Low
Testing: Unit Tests
Docs Changes: Added description on %UPSTREAM_REQUEST_ATTEMPT_COUNT% in the Docs.
Release Notes: Added
Platform Specific Features: N/A

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

…TTEMPT_COUNT% to retrieve the number of times given request got attempted upstream

Signed-off-by: Rohit Agrawal <[email protected]>
@agrawroh
agrawroh force-pushed the upstream-rq-attempt-count branch from 849aae4 to b1f7481 Compare December 1, 2021 05:20

@ggreenway ggreenway 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.

Could you make this work with tcp_proxy? It should be one extra line of code to set the attemp count (which is already being tracked).

@ggreenway ggreenway self-assigned this Dec 1, 2021
@agrawroh

agrawroh commented Dec 1, 2021

Copy link
Copy Markdown
Member Author

@ggreenway I think it's already being set here: https://github.com/envoyproxy/envoy/blob/main/source/common/tcp_proxy/tcp_proxy.cc#L429

It should work with tcp_proxy as well. Let me update the docs.

@ggreenway ggreenway 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.

LGTM. Thanks!

@ggreenway
ggreenway enabled auto-merge (squash) December 1, 2021 19:02
@ggreenway
ggreenway merged commit ef1faea into envoyproxy:main Dec 1, 2021
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.

FR: field extractor of attempt count in the access log

2 participants