Skip to content

dym: extract shared utility for path-based dynamic metadata access#44833

Open
codefromthecrypt wants to merge 1 commit into
envoyproxy:mainfrom
codefromthecrypt:get_dynamic_metadata
Open

dym: extract shared utility for path-based dynamic metadata access#44833
codefromthecrypt wants to merge 1 commit into
envoyproxy:mainfrom
codefromthecrypt:get_dynamic_metadata

Conversation

@codefromthecrypt
Copy link
Copy Markdown
Contributor

The access logger SDK already has get_dynamic_metadata with dotted-path traversal via Envoy::Config::Metadata::metadataValue. Extract the shared logic into metadata_utils so both access logger and HTTP filter SDKs use the same implementation. Add the callback to both Go and Rust SDKs.

Risk Level: Low — new additive callback, access logger refactored to use shared utility (no behavioral change)
Testing: Unit tests for shared utility, HTTP filter callback, access logger regression, Go/Rust SDK integration tests
Docs Changes: N/A
Release Notes: N/A

…access

The access logger SDK already has get_dynamic_metadata with dotted-path
traversal via Envoy::Config::Metadata::metadataValue. Extract the shared
logic into metadata_utils so both access logger and HTTP filter SDKs use
the same implementation. Add the callback to both Go and Rust SDKs.

Risk Level: Low — new additive callback, access logger refactored to use
shared utility (no behavioral change)
Testing: Unit tests for shared utility, HTTP filter callback, access logger
regression, Go/Rust SDK unit and integration tests
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt codefromthecrypt changed the title dym: extract shared metadata utility for path-based dynamic metadata access dym: extract shared utility for path-based dynamic metadata access May 4, 2026
@kyessenov
Copy link
Copy Markdown
Contributor

/wait
for @wbpcode - feel free to load-balance since you seem to have a lot on your plate

* @param filter_name is the filter namespace in dynamic metadata.
* @param path is the key path within the filter namespace (dot-separated for nested access).
* @param result is the pointer to the envoy_buffer where the string value will be stored.
* @return true if the value exists and is a string, false otherwise.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

one q I have for others is if having an api for only string is likely to result quickly in another, or if we should have one for type, a type param/result pair, or a struct based one?

I can think of use cases where non-string metadata might be structured, just would love some concrete suggestions from folks who write a lot of it.. if this is a stopgap or the final api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants