Table of Contents
When Sentry shows hundreds of unresolved issues, how do you find the bugs worth fixing without drowning in noise?
The key is strategic filtering—exclude performance and architectural problems, surface defensive coding gaps.
The Filtering Strategy
Start with your baseline query:
is:unresolvedenvironment:productionstatsPeriod:14d(last 14 days)
Then exclude the noise:
!issue.type:performance_n_plus_one_db_queries
!issue.type:performance_slow_db_query
!title:"External API timeout"
Why exclude these?
- N+1 queries → Need query optimization, not bug fixes
- Slow queries → Architectural problem (indexing, caching)
- Third-party errors → External dependency, can’t fix on your end
What You’re Left With: Quick Wins
After filtering, you’ll surface bugs that are actually fixable:
- Defensive coding gaps: Null checks, division by zero, type validation
- Edge case handling: Missing data, unexpected input formats
- Race conditions: Duplicate queue entries, concurrency issues
Example Quick Wins
// Before: Division by zero crash
$average = $total / $count;
// After: Defensive guard
$average = $count > 0 ? $total / $count : 0;
// Before: Type error when null
$data = json_decode($response->body);
// After: Null coalescing + validation
$data = json_decode($response->body ?? '{}') ?: [];
// Before: Duplicate queue entries
ProcessReport::dispatch($reportId);
// After: Idempotency key
ProcessReport::dispatch($reportId)
->onQueue('reports')
->withChain([
new MarkReportProcessed($reportId)
]);
The Mindset Shift
Don’t try to fix everything. Filter out architectural problems (performance, scalability, external APIs). Focus on defensive coding (validation, null safety, edge cases).
Quick wins = small PRs with immediate impact. Fix 5 crashes in an hour instead of chasing one slow query for a week.
Your Action Items
- Build your exclusion filter template (save it as a bookmark)
- Run it weekly to surface new defensive coding gaps
- Prioritize by event count + affected users
- Create small, focused PRs
Bonus tip: If an issue keeps recurring after a “fix”, it’s probably architectural. Exclude it and move on.
Leave a Reply