Skip to content

Commit 2069ca2

Browse files
prestwichclaude
andcommitted
fix(host-rpc): record metrics on drain_backfill error paths
Add inc_rpc_errors and record_backfill_batch on fetch_range and maybe_refresh_tags failure paths for consistent error observability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c5c8cbd commit 2069ca2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

crates/host-rpc/src/notifier.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,11 @@ where
531531

532532
let blocks = match self.fetch_range(from, to).await {
533533
Ok(b) => b,
534-
Err(e) => return Some(Err(e)),
534+
Err(e) => {
535+
crate::metrics::inc_rpc_errors();
536+
crate::metrics::record_backfill_batch(start.elapsed());
537+
return Some(Err(e));
538+
}
535539
};
536540

537541
let view_entries: Vec<(u64, B256)> =
@@ -548,6 +552,7 @@ where
548552
if let Some(last) = blocks.last()
549553
&& let Err(e) = self.maybe_refresh_tags(last.block.timestamp()).await
550554
{
555+
crate::metrics::record_backfill_batch(start.elapsed());
551556
return Some(Err(e));
552557
}
553558

0 commit comments

Comments
 (0)