fix(metrics): Add TASKS_ADDED_COUNT and TASKS_RESET_COUNT metrics in router scheduler flow (#3189)

This commit is contained in:
Pa1NarK
2024-01-18 15:44:59 +05:30
committed by GitHub
parent e816ccfbdd
commit b4df40db25
8 changed files with 67 additions and 6 deletions

View File

@ -115,6 +115,12 @@ Team Hyperswitch"),
let task_ids = vec![task_id];
db.process_tracker_update_process_status_by_ids(task_ids, updated_process_tracker_data)
.await?;
// Remaining tasks are re-scheduled, so will be resetting the added count
metrics::TASKS_RESET_COUNT.add(
&metrics::CONTEXT,
1,
&[metrics::request::add_attributes("flow", "ApiKeyExpiry")],
);
}
Ok(())