formatter: add access log formatters for tracking upstream hosts and connection IDs attempted#43215
Conversation
…connection IDs attempted Signed-off-by: Issa Abu Kalbein <iabukalbein@microsoft.com>
|
/retest |
Signed-off-by: Issa Abu Kalbein <86603440+IssaAbuKalbein@users.noreply.github.com>
|
/retest |
| * This is useful for tracking retry behavior in access logs. | ||
| * @param host the host description that was attempted. | ||
| */ | ||
| virtual void addUpstreamHostAttempted(Upstream::HostDescriptionConstSharedPtr host) PURE; |
There was a problem hiding this comment.
I think we can add this behavior to the existing setUpstreamHost and setUpstreamConnectionId since they are always called together now. Let me know what you think.
There was a problem hiding this comment.
I've merged addUpstreamConnectionIdAttempted into setUpstreamConnectionId — all 4 call sites were always paired together, so setUpstreamConnectionId now automatically pushes to the attempted list and the separate addUpstreamConnectionIdAttempted API has been removed.
For setUpstreamHost / addUpstreamHostAttempted however, these can't be safely merged. setUpstreamHost has 12 call sites but only 3 are paired with addUpstreamHostAttempted. The other 9 include health checkers, ext_proc, ext_authz, pool success/failure callbacks, and low-level connection creation — these set the host for informational purposes but don't represent routing attempts. Merging would pollute UPSTREAM_HOST_NAMES_ATTEMPTED with non-routing entries (e.g., health check hosts).
…e usage Signed-off-by: Issa Abu Kalbein <iabukalbein@microsoft.com>
Signed-off-by: Issa Abu Kalbein <86603440+IssaAbuKalbein@users.noreply.github.com>
|
/retest |
1 similar comment
|
/retest |
Signed-off-by: Issa Abu Kalbein <86603440+IssaAbuKalbein@users.noreply.github.com>
|
/retest |
Signed-off-by: Issa Abu Kalbein <86603440+IssaAbuKalbein@users.noreply.github.com>
…connection IDs attempted (envoyproxy#43215) 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 processing Extended `StreamInfo::UpstreamInfo` interface 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.rst` with documentation for all new formatters. __Release Notes:__ Added entry in `changelogs/current.yaml`. __Platform Specific Features:__ N/A --------- Signed-off-by: Issa Abu Kalbein <iabukalbein@microsoft.com> Signed-off-by: Issa Abu Kalbein <86603440+IssaAbuKalbein@users.noreply.github.com> Co-authored-by: Issa Abu Kalbein <iabukalbein@microsoft.com> Signed-off-by: bjmask <11672696+bjmask@users.noreply.github.com>
…connection IDs attempted (envoyproxy#43215) 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 processing Extended `StreamInfo::UpstreamInfo` interface 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.rst` with documentation for all new formatters. __Release Notes:__ Added entry in `changelogs/current.yaml`. __Platform Specific Features:__ N/A --------- Signed-off-by: Issa Abu Kalbein <iabukalbein@microsoft.com> Signed-off-by: Issa Abu Kalbein <86603440+IssaAbuKalbein@users.noreply.github.com> Co-authored-by: Issa Abu Kalbein <iabukalbein@microsoft.com>
…connection IDs attempted (envoyproxy#43215) 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 processing Extended `StreamInfo::UpstreamInfo` interface 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.rst` with documentation for all new formatters. __Release Notes:__ Added entry in `changelogs/current.yaml`. __Platform Specific Features:__ N/A --------- Signed-off-by: Issa Abu Kalbein <iabukalbein@microsoft.com> Signed-off-by: Issa Abu Kalbein <86603440+IssaAbuKalbein@users.noreply.github.com> Co-authored-by: Issa Abu Kalbein <iabukalbein@microsoft.com>
…connection IDs attempted (envoyproxy#43215) 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 processing Extended `StreamInfo::UpstreamInfo` interface 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.rst` with documentation for all new formatters. __Release Notes:__ Added entry in `changelogs/current.yaml`. __Platform Specific Features:__ N/A --------- Signed-off-by: Issa Abu Kalbein <iabukalbein@microsoft.com> Signed-off-by: Issa Abu Kalbein <86603440+IssaAbuKalbein@users.noreply.github.com> Co-authored-by: Issa Abu Kalbein <iabukalbein@microsoft.com>
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