Skip to content

Conversation

@PetrMc
Copy link

@PetrMc PetrMc commented Nov 19, 2025

What this PR does / why we need it:

Enables waypoint proxies to identify source workload in distributed traces. The peer_metadata filter now sets dynamic metadata with the source workload name during downstream peer discovery. Istio control plane will configure waypoint trace tags to read this metadata. (will be a separate PR in https://github.com/istio/istio repo

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes # istio/istio#58348

@PetrMc PetrMc requested a review from a team as a code owner November 19, 2025 21:17
@istio-policy-bot
Copy link

😊 Welcome @PetrMc! This is either your first contribution to the Istio proxy repo, or it's been
a while since you've been here.

You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines
by referring to Contributing to Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@istio-testing istio-testing added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 19, 2025
Copy link
Contributor

@keithmattix keithmattix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've got tests for stats; should we add some test cases for this?

setFilterState(info, downstream, *result);
// For waypoint case, set dynamic metadata with SOURCE workload name for tracing
// ONLY set for downstream (client) discovery - not upstream (destination).
if (downstream && !result->workload_name_.empty()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reasonable way to expose all the info? Its kind of annoying to just have a subset.

In particular, the 'workload' may be useless info without 'source namespace' as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it already in filter state? with istio/api#3600 can we access it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @howardjohn! istio/api#3600 would help if Envoy's CustomTag supported formatters, but it currently only reads from dynamic metadata (CustomTag_Metadata), not filter state. Updated the PR to expose all peer metadata fields.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

value
(string) Custom tag value.

The same format specifier as used for HTTP access logging applies here, however unknown specifier values are replaced with the empty string instead of -.

Used to specify what kind of custom tag.

which allows %FILTER_STATE(KEY:F:FIELD?):Z%

seems like it could work? I haven't tried

(I read the API 3 times and didn't realize this was possible until now)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks John, closing the PR as there is no need for the proxy change. (and wow!)

@istio-testing istio-testing added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 20, 2025
@PetrMc
Copy link
Author

PetrMc commented Nov 20, 2025

/test test-arm-arm64

@istio-testing
Copy link
Collaborator

@PetrMc: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
test-asan_proxy 671af81 link true /test test-asan
release-test-arm64_proxy 671af81 link true /test release-test-arm64
test_proxy 671af81 link true /test test
release-test_proxy 671af81 link true /test release-test
test-arm-arm64_proxy 671af81 link true /test test-arm-arm64

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@PetrMc PetrMc closed this Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants