From 86ad431e16dee9902ec806ec50539f1004c0c762 Mon Sep 17 00:00:00 2001 From: Thomas Orozco Date: Thu, 12 Mar 2020 08:10:20 -0700 Subject: [PATCH] mononoke/fastreplay: add an replay_outcome_permille counter Summary: Similarly to D20418610, let's keep track of request failure rates in ODS counters so they can be health-cheked by SF. Reviewed By: farnz Differential Revision: D20418705 fbshipit-source-id: 1d281e06c59414a0610836106370592596b47e39 --- eden/mononoke/fastreplay/src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eden/mononoke/fastreplay/src/main.rs b/eden/mononoke/fastreplay/src/main.rs index 7a2e962f23..e053d08ad4 100644 --- a/eden/mononoke/fastreplay/src/main.rs +++ b/eden/mononoke/fastreplay/src/main.rs @@ -61,6 +61,7 @@ define_stats! { admitted: timeseries(Rate, Sum), processed: timeseries(Rate, Sum), skipped: timeseries(Rate, Sum), + replay_outcome_permille: timeseries(Average), } const ARG_NO_SKIPLIST: &str = "no-skiplist"; @@ -172,10 +173,12 @@ async fn dispatch( match res { Ok(size) => { + STATS::replay_outcome_permille.add_value(1000); scuba.add("replay_response_size", size); scuba.log_with_msg("Replay Succeeded", None); } Err(e) => { + STATS::replay_outcome_permille.add_value(0); scuba .unsampled() .log_with_msg("Replay Failed", format!("{:#?}", e));