mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
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
This commit is contained in:
parent
b60606cf9a
commit
86ad431e16
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user