Skip to content

Commit e25bc35

Browse files
nipunn1313Convex, Inc.
authored andcommitted
Sample the CommitterFullError a bit more (#34602)
Don't love this sampling logic directly reading short_msg, but I think it'll serve the goal here. CommitterFullError is the top error going to sentry, it's triggering our spike protection, and it's not particularly useful at high volume. GitOrigin-RevId: d6e37b379321c799ffba6c1d626d07816a14b56d
1 parent fff8e43 commit e25bc35

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/errors/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ impl ErrorMetadata {
457457
| ErrorCode::RejectedBeforeExecution
458458
| ErrorCode::OperationalInternalServerError => Some((sentry::Level::Warning, None)),
459459

460-
// 1% sampling for OCC/Overloaded/RateLimited, since we only really care about the
460+
// Sampling for OCC/Overloaded/RateLimited, since we only really care about the
461461
// details if they happen at high volume.
462462
ErrorCode::RateLimited => Some((sentry::Level::Info, Some(0.001))),
463463
ErrorCode::OCC {
@@ -466,6 +466,9 @@ impl ErrorMetadata {
466466
ErrorCode::OCC {
467467
is_system: true, ..
468468
} => Some((sentry::Level::Warning, Some(0.01))),
469+
ErrorCode::Overloaded if self.short_msg == "CommitterFullError" => {
470+
Some((sentry::Level::Warning, Some(0.001)))
471+
},
469472
// we want to see these a bit more than the others above
470473
ErrorCode::Overloaded => Some((sentry::Level::Warning, Some(0.1))),
471474
}

0 commit comments

Comments
 (0)