docs: Clarify UPSTREAM_REMOTE_ADDRESS and UPSTREAM_HOST access log variables are the same #29800
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.
These access log variables use identical code so they should always be equivalent. I was initially wondering how these variables differed, but after digging in, I found they have identical source code, so I thought this might be worth pointing out in the docs that these reflect the same value.
I suppose one of these could be deprecated if you all wanted to eliminate the duplication, but that would obviously be a bigger change. In the meantime, I thought clarifying the fact that they are the same might help clear up any confusion, like my own. It seems like
UPSTREAM_REMOTE_ADDRESS
was added more recently (#19613) and is part of a more consistent set of variables, butUPSTREAM_HOST
has been around much longer.Current identical implementation between these two variables on
main
:envoy/source/common/formatter/stream_info_formatter.cc
Lines 876 to 887 in 6092cdc
envoy/source/common/formatter/stream_info_formatter.cc
Lines 941 to 952 in 6092cdc
Also the same implementation on the
v1.27.0
tag:https://github.com/envoyproxy/envoy/blob/v1.27.0/source/common/formatter/substitution_formatter.cc#L1128-L1140
https://github.com/envoyproxy/envoy/blob/v1.27.0/source/common/formatter/substitution_formatter.cc#L1205-L1217
Commit Message: docs: Clarify UPSTREAM_REMOTE_ADDRESS and UPSTREAM_HOST are the same
Additional Description: N/A
Risk Level: Low (docs only)
Testing: N/A
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A