Skip to content

Commit

Permalink
Add non-per-repo timeseries to WBC
Browse files Browse the repository at this point in the history
Summary:
Add non-per-repo timeseries to WBC
This will allow for the deprecation of the per-repo timeseries, as it is only used as an aggregatd in a healthcheck:

https://www.internalfb.com/code/configerator/source/scm/mononoke/health/bookmark_service.health_check.cconf?lines=19-22

Reviewed By: andreacampi

Differential Revision: D68954697

fbshipit-source-id: 872af9ee999a77bc75170959b0fdb68d43ec5c91
  • Loading branch information
Clara Rull authored and facebook-github-bot committed Jan 31, 2025
1 parent 9188dda commit df3b3b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eden/mononoke/bookmarks/warm_bookmarks_cache/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ define_stats! {
bookmark_discover_failures: timeseries(Rate, Sum),
bookmark_update_failures: timeseries(Rate, Sum),
max_staleness_secs: dynamic_singleton_counter("{}.max_staleness_secs", (reponame: String)),
global_max_staleness_secs: singleton_counter(),
}

pub struct WarmBookmarksCache {
Expand Down Expand Up @@ -1034,6 +1035,7 @@ fn report_delay_and_remove_finished_updaters(
});

STATS::max_staleness_secs.set_value(ctx.fb, max_staleness, (reponame.to_owned(),));
STATS::global_max_staleness_secs.set_value(ctx.fb, max_staleness);
#[cfg(fbcode_build)]
WBC_INSTRUMENT.observe(MononokeWarmBookmarkCacheStats {
repo: Some(reponame.to_owned()),
Expand Down

0 comments on commit df3b3b9

Please sign in to comment.