-
Notifications
You must be signed in to change notification settings - Fork 4.1k
feat(metrics): add support for gauge metrics and include IMC metrics #4939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…erswitch into add-support-for-guage-metrics
crate::gauge_metrics_for_imc!( | ||
CONFIG_CACHE, | ||
ACCOUNTS_CACHE, | ||
ROUTING_CACHE, | ||
CGRAPH_CACHE, | ||
PM_FILTERS_CGRAPH_CACHE | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd have to include DECISION_MANAGER_CACHE
and SURCHARGE_CACHE
once #4814 is merged. How can we ensure that developers introducing new cache instances add metrics for them here: would including a comment in crates/storage_impl/src/redis/cache.rs
be useful, or is there anything else that can be done?
Type of Change
Description
This PR adds support for gauge metrics. Additionally the pr also adds a background thread, which will be spawned during application startup, that runs for every fixed interval (configurable) of time, collecting the metrics. For now this collector collects the gauge metrics of
cache_entry_count
of all the cache types.Additional Changes
Motivation and Context
How did you test it?
Hit list payment methods for a merchant endpoint and check for
router_CACHE_ENTRY_COUNT
metric in grafanaChecklist
cargo +nightly fmt --all
cargo clippy