dynamic_modules: expose stat tags and tag-extracted names in the stats sink ABI#46028
dynamic_modules: expose stat tags and tag-extracted names in the stats sink ABI#46028basundhara-c wants to merge 2 commits into
Conversation
…s sink ABI Signed-off-by: Basundhara Chakrabarty <basundhara17061996@gmail.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces new ABI functions and Rust SDK wrappers to retrieve tag-extracted names, tag counts, and individual tags for counters, gauges, and text readouts in Envoy dynamic modules. It also refactors buffer-filling logic in the Rust SDK and adds comprehensive unit tests in both C++ and Rust. The feedback points out a minor documentation mismatch in the Rust SDK where counter_tag_extracted_name is documented as returning None instead of false when the index is out of range.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| } | ||
|
|
||
| /// Reads the tag-extracted name of the counter at `index` into `name` (the stat name with tag | ||
| /// values removed). Returns `None` and leaves `name` unchanged when the index is out of range. |
There was a problem hiding this comment.
The doc comment for counter_tag_extracted_name states that it returns None when the index is out of range, but the function actually returns a bool (returning false on failure). The documentation should be updated to reflect the correct return type.
| /// values removed). Returns `None` and leaves `name` unchanged when the index is out of range. | |
| /// values removed). Returns false and leaves name unchanged when the index is out of range. |
…oc comment Signed-off-by: Basundhara Chakrabarty <basundhara17061996@gmail.com>
839fcbb to
3fee654
Compare
Commit Message: expose stat tags and tag-extracted names in the stats sink ABI
Additional Description:
The stats sink ABI previously exposed only each stat's full, flat name (e.g. cluster.foo.upstream_rq_total) and its value. This adds callbacks to also read a stat's tag-extracted name and its tags (name/value pairs) for counters, gauges, etc.
This lets a custom dynamic-module stats sink consume the same dimensional decomposition Envoy's built-in formatters use so it can reconstruct labelled output like envoy_cluster_upstream_rq_total{cluster_name="foo"} instead of only the flat name.
Risk Level: Low
Testing: Tests Added
Docs Changes: N.A
Release Notes: N.A
Platform Specific Features: N.A