dym: extract shared utility for path-based dynamic metadata access#44833
Open
codefromthecrypt wants to merge 1 commit into
Open
dym: extract shared utility for path-based dynamic metadata access#44833codefromthecrypt wants to merge 1 commit into
codefromthecrypt wants to merge 1 commit into
Conversation
b5aeb6d to
7408ca3
Compare
…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>
7408ca3 to
1a1eb64
Compare
Contributor
|
/wait |
| * @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. |
Contributor
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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