feat: backfill timing metric (#10218)

1. Add a metric to measure the backfill time
2. Add a unit to the timing histogram
This commit is contained in:
jif-oai
2026-01-30 10:19:41 +01:00
committed by GitHub
parent a0ccef9d5c
commit 129787493f
4 changed files with 48 additions and 2 deletions

View File

@@ -34,5 +34,7 @@ pub use runtime::STATE_DB_FILENAME;
pub const DB_ERROR_METRIC: &str = "codex.db.error";
/// Metrics on backfill process during first init of the db. Tags: [status]
pub const DB_METRIC_BACKFILL: &str = "codex.db.backfill";
/// Metrics on backfill duration during first init of the db. Tags: [status]
pub const DB_METRIC_BACKFILL_DURATION_MS: &str = "codex.db.backfill.duration_ms";
/// Metrics on errors during comparison between DB and rollout file. Tags: [stage]
pub const DB_METRIC_COMPARE_ERROR: &str = "codex.db.compare_error";