formatter: add access log formatters for tracking upstream hosts and connection IDs attempted #43215
+572
−9
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.
Commit Message: formatter: add access log formatters for tracking upstream hosts and connection IDs attempted
Additional Description: Adds new access log formatters to track all upstream hosts and connection IDs attempted during request processing:
%UPSTREAM_HOSTS_ATTEMPTED%- Comma-separated list of upstream host addresses (ip:port)%UPSTREAM_HOSTS_ATTEMPTED_WITHOUT_PORT%- Upstream host addresses without port%UPSTREAM_HOST_NAMES_ATTEMPTED%- Upstream host names%UPSTREAM_HOST_NAMES_ATTEMPTED_WITHOUT_PORT%- Upstream host names without port%UPSTREAM_CONNECTION_IDS_ATTEMPTED%- Connection IDs used during request processingExtended
StreamInfo::UpstreamInfointerface with methods to track attempted hosts and connection IDs. Implemented tracking in HTTP router, TCP proxy, and UDP proxy.Risk Level: Low
Testing: Unit tests added for all new formatters. Mocks updated for new interface methods.
Docs Changes: Updated
docs/root/configuration/advanced/substitution_formatter.rstwith documentation for all new formatters.Release Notes: Added entry in
changelogs/current.yaml.Platform Specific Features: N/A