Skip to content

Conversation

@agrawroh
Copy link
Member

Description

This PR adds stats access APIs to the Bootstrap Extension.


Commit Message: dynamic_modules: add stats access APIs to Bootstrap Extension
Additional Description: Added stats access APIs to the Bootstrap Extension.
Risk Level: Low
Testing: Added Tests
Docs Changes: N/A
Release Notes: N/A

@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #43029 was opened by agrawroh.

see: more, trace.

@agrawroh agrawroh force-pushed the feat-dm-bts-1 branch 4 times, most recently from fba9c61 to 1c63ab4 Compare January 16, 2026 22:29
@agrawroh agrawroh marked this pull request as ready for review January 16, 2026 23:00
* @param iterator_fn is the callback function to call for each gauge.
* @param user_data is the user data to pass to the callback function.
*/
void envoy_dynamic_module_callback_bootstrap_extension_iterate_gauges(
Copy link
Member

Choose a reason for hiding this comment

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

ah this is actually nice

mathetake
mathetake previously approved these changes Jan 16, 2026

// Iterate over all counters to find the one with matching name.
bool found = false;
stats_store.forEachCounter([](size_t) {},
Copy link
Member

Choose a reason for hiding this comment

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

oh wait is there no way to lookup faster than O(n)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like there isn't :(

Copy link
Member

Choose a reason for hiding this comment

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

wtf

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I think I can use iterate() instead and exit early. Let me switch to that. That will let us do it in O(k) instead of a full scan.

@agrawroh agrawroh enabled auto-merge (squash) January 16, 2026 23:25
@agrawroh agrawroh merged commit a0d51f8 into envoyproxy:main Jan 16, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants