Skip to content

statsmanager: add rust type and ffi for managing common metrics - #48425

Merged
jkarneges merged 1 commit into
mainfrom
jkarneges/statsmanager-rust-common
Sep 10, 2026
Merged

statsmanager: add rust type and ffi for managing common metrics#48425
jkarneges merged 1 commit into
mainfrom
jkarneges/statsmanager-rust-common

Conversation

@jkarneges

Copy link
Copy Markdown
Member

This adds a statsmanager Rust module along with a CommonMetrics type and FFI for managing the kinds of metrics that the C++ StatsManager class would need if it were to rely on Rust code for managing its Prometheus metrics.

For now this code is unused, but the plan is to change StatsManager to call CommonMetrics::update with the values from its combinedReport field. The values in combinedReport are cumulative, so update computes deltas to increment by.

Note: normally, we should declare Prometheus metrics within the specific components that use them rather than in core (e.g. connmgr's metrics are declared in the connmgr module), however since StatsManager is already in core it is easier to start out by putting the metrics it needs alongside it, hence naming them "common" metrics. Later on we can consider teasing them out somehow into separate components.

@jkarneges
jkarneges requested a review from a team September 10, 2026 23:13
@jkarneges
jkarneges merged commit 697b8f6 into main Sep 10, 2026
21 checks passed
@jkarneges
jkarneges deleted the jkarneges/statsmanager-rust-common branch September 10, 2026 23:28
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