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

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
merged 3 commits into from
Dec 1, 2021

Conversation

agrawroh
Copy link
Contributor

@agrawroh agrawroh commented Dec 1, 2021

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
Copy link
Contributor

@ggreenway ggreenway left a comment

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
Copy link
Contributor Author

agrawroh commented Dec 1, 2021

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

Copy link
Contributor

@ggreenway ggreenway left a comment

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