Noise Filtering
Every browser tab generates noise — extension errors, analytics script failures, framework warnings, Content Security Policy violations from third-party scripts. Without filtering, your AI spends time investigating false leads instead of real bugs.
Gasoline’s noise filtering lets you suppress irrelevant errors so the AI only sees what matters.
Auto-Detect Noise
Section titled “Auto-Detect Noise”The fastest way to clean up:
configure({action: "noise_rule", noise_action: "auto_detect"})Gasoline scans current errors and identifies patterns that are likely noise:
- Browser extension errors (
chrome-extension://,moz-extension://) - Analytics failures (Google Analytics, Segment, Mixpanel)
- Framework development warnings (React, Angular, Vue dev-mode messages)
- Third-party script errors from ad networks and trackers
- CSP violations from injected scripts
Auto-detect creates rules automatically. Review them to make sure nothing important was filtered:
configure({action: "noise_rule", noise_action: "list"})Manual Rules
Section titled “Manual Rules”Add a Rule
Section titled “Add a Rule”configure({action: "noise_rule", noise_action: "add", pattern: "analytics\\.google", category: "console", reason: "Google Analytics noise"})| Parameter | Description |
|---|---|
pattern | Regex pattern to match against error messages |
category | Which buffer to filter: console, network, or websocket |
reason | Human-readable explanation (helps when reviewing rules later) |
Pattern Examples
Section titled “Pattern Examples”| What to Filter | Pattern | Category |
|---|---|---|
| Google Analytics | analytics\\.google | network |
| Facebook Pixel | facebook\\.com\\/tr | network |
| React dev warnings | Warning: Each child in a list | console |
| Angular dev mode | Angular is running in development mode | console |
| Browser extensions | chrome-extension:// | console |
| Hot reload noise | \\[HMR\\] | console |
| Source map warnings | DevTools failed to load source map | console |
| Favicon 404 | favicon\\.ico | network |
| Service worker updates | service-worker\\.js | network |
Batch Add Rules
Section titled “Batch Add Rules”Add multiple rules at once:
configure({action: "noise_rule", noise_action: "add", rules: [ {pattern: "analytics\\.google", category: "network", reason: "Analytics"}, {pattern: "facebook\\.com\\/tr", category: "network", reason: "Facebook Pixel"}, {pattern: "\\[HMR\\]", category: "console", reason: "Hot module reload"}, {pattern: "chrome-extension://", category: "console", reason: "Browser extensions"} ]})Managing Rules
Section titled “Managing Rules”List All Rules
Section titled “List All Rules”configure({action: "noise_rule", noise_action: "list"})Returns every active rule with its ID, pattern, category, and reason.
Remove a Rule
Section titled “Remove a Rule”If you filtered something that turned out to be important:
configure({action: "noise_rule", noise_action: "remove", rule_id: "rule-123"})Get the rule ID from the list output.
Reset All Rules
Section titled “Reset All Rules”Start fresh:
configure({action: "noise_rule", noise_action: "reset"})Removes all noise rules. Useful when switching projects or when you’ve over-filtered.
Workflow: Clean Session Setup
Section titled “Workflow: Clean Session Setup”When starting a new debugging session:
1. Check Current Errors
Section titled “1. Check Current Errors”"What browser errors do you see?"observe({what: "errors"})2. Auto-Detect Noise
Section titled “2. Auto-Detect Noise”"Auto-detect noise and filter it out."configure({action: "noise_rule", noise_action: "auto_detect"})3. Review What Was Filtered
Section titled “3. Review What Was Filtered”"Show me the noise rules — make sure nothing important got filtered."configure({action: "noise_rule", noise_action: "list"})4. Check Cleaned Errors
Section titled “4. Check Cleaned Errors”"Now show me the errors again."observe({what: "errors"})The error list now contains only your application’s real issues.
5. Add Project-Specific Rules
Section titled “5. Add Project-Specific Rules”If your project has known noisy patterns:
"Also filter out hot reload messages and favicon 404s."configure({action: "noise_rule", noise_action: "add", rules: [ {pattern: "\\[HMR\\]", category: "console", reason: "Dev server noise"}, {pattern: "favicon\\.ico", category: "network", reason: "Missing favicon"} ]})Categories
Section titled “Categories”Noise rules filter different buffers:
| Category | What It Filters | Examples |
|---|---|---|
console | Console logs, errors, and warnings | Extension errors, framework warnings, dev-mode messages |
network | Network requests and responses | Analytics calls, tracking pixels, CDN errors |
websocket | WebSocket events | Heartbeat messages, ping/pong noise |
A rule in one category doesn’t affect the others. An analytics.google rule in the network category won’t filter a console.error that mentions Google Analytics — you’d need a separate console rule for that.
Run auto-detect on a fresh page load. The first load generates the most noise — extensions initialize, analytics fire, framework warnings appear. Auto-detect catches the most patterns if you run it immediately after loading.
Keep reasons descriptive. When you review rules weeks later, “Google Analytics noise” is more useful than “network filter 3.” Good reasons also help the AI understand why something is filtered.
Don’t over-filter. If you’re not sure whether something is noise, leave it unfiltered. It’s better to investigate a false lead than to miss a real error.
Filter by category, not globally. A pattern like error in the console category would filter too broadly. Be specific with patterns — match the exact string or URL that generates the noise.
Reset when switching projects. Noise rules are session-scoped. If you switch from a React app to a Vue app, the framework warnings change. Reset and re-detect.