Repository navigation
Conversation
Envoy Gateway suppresses the x-envoy-* headers unless a ClientTrafficPolicy sets headers.enableEnvoyHeaders. Two fields of the default access log format depend on them: x-envoy-origin-path falls back to :PATH and logs the rewritten path for routes with a URL rewrite, and x-envoy-upstream-service-time is empty. Spell this out in the note under the default format, and fix its link, which pointed at the BackendTrafficPolicy anchor through a relative path that resolves to a page that doesn't exist. Fixes envoyproxy#2903 Signed-off-by: Lakhan Yelgate <39281685+lyelgate@users.noreply.github.com>
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
#2903 reported that, since Envoy headers became disabled by default (#2500, #2585), the default access log no longer shows the original request path for routes with a URL rewrite. @zirain asked for this to be highlighted in the Default Access Log docs rather than changing the format.
There is a note under the default format already, but it doesn't say what the user loses, and its link is broken:
headers.enableEnvoyHeadersis set (SuppressEnvoyHeaders: !enableEnvoyHeadersininternal/xds/filters/wellknown.go). Two fields of the default format depend on them:x-envoy-origin-pathis%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%. Without the header it falls back to:PATH, which is the rewritten path for routes with a URL rewrite filter. That's the behavior reported in the issue.x-envoy-upstream-service-timeis%RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)%, which is empty without the header.#backendtrafficpolicy, although the field is on ClientTrafficPolicy.../../api/extension_types. From/latest/tasks/observability/proxy-accesslog/that resolves to/latest/tasks/api/extension_types/, which returns 404 on the live site. Task pages link to the API reference with../../../api/....This PR rewrites the note to list the two fields and what each logs without Envoy headers, and to link to
headers.enableEnvoyHeadersinHeaderSettings. It also mentions that enabling the field adds thex-envoy-*headers to requests and responses, so users know it isn't only a logging switch.Changes:
site/content/en/latest/tasks/observability/proxy-accesslog.md: rewrite the note under the default format.Testing:
codespellis clean, and the enabled markdownlint rules (MD001, MD009, MD037, MD038) were checked by hand./latest/api/extension_types/returns 200 and the old target/latest/tasks/api/extension_types/returns 404.Which issue(s) this PR fixes:
Fixes #2903
PR Checklist
git commit -s). See DCO: Sign your work./api.make generate gen-check,make lint, and the unit-test/coverage build pass. (Flaky e2e failures are not considered breakages, butgen-check,lint, and coverage MUST pass.) N/A: docs only.release-notes/current/breaking_changes/.