From 6944f2d6baacb2f3924caf5bb46ba411665b5e5b Mon Sep 17 00:00:00 2001 From: Ben Dean-Kawamura Date: Thu, 19 Mar 2026 12:17:29 -0400 Subject: [PATCH] Add breadcrumb when rate limiting fails to read the clock This rate limit check doesn't seem to be working in same cases, for example for https://bugzilla.mozilla.org/show_bug.cgi?id=2004954 I saw many reports per minute from the same user. I'm wondering if the cause is this check failing. --- components/support/error/src/error_tracing.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/support/error/src/error_tracing.rs b/components/support/error/src/error_tracing.rs index 01642a0097..9092e832d9 100644 --- a/components/support/error/src/error_tracing.rs +++ b/components/support/error/src/error_tracing.rs @@ -9,6 +9,8 @@ use std::{ use parking_lot::Mutex; +use crate::breadcrumb; + static GLOBALS: Mutex = Mutex::new(Globals::new()); pub fn report_error_to_app(type_name: String, message: String) { @@ -139,7 +141,9 @@ impl RateLimiter { // with NTP, if users manually adjust their clocks, etc. Letting an extra event // through seems okay in this case. We should get back into a good state soon // after. - _ => (), + _ => { + breadcrumb!("error_support: checked_duration_since failed"); + } } } last_report.insert(component.to_string(), now);