IntegrationQuick Start
Quick Start
1. Get Your API Key
- Go to your Organization Settings in the NoiseGate dashboard
- Navigate to NoiseGate → API Key
- Click Generate API Key
- Copy and save your key (starts with
ng_live_)
2. Install NoiseGate
Add the filter to your Sentry initialization:
import * as Sentry from "@sentry/browser";
// Cache patterns to avoid repeated API calls
let cachedPatterns = null;
let cacheExpiry = 0;
async function getPatterns() {
if (cachedPatterns && Date.now() < cacheExpiry) {
return cachedPatterns;
}
const response = await fetch("https://api.noisegate.dev/v1/filters", {
headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const data = await response.json();
cachedPatterns = data.patterns;
cacheExpiry = Date.now() + 5 * 60 * 1000; // 5 min cache
return cachedPatterns;
}
Sentry.init({
dsn: "YOUR_SENTRY_DSN",
beforeSend: async (event) => {
try {
const patterns = await getPatterns();
const message = event.exception?.values?.[0]?.value || "";
const shouldFilter = patterns.some(p =>
p.type === "regex"
? new RegExp(p.pattern).test(message)
: message.includes(p.pattern)
);
return shouldFilter ? null : event;
} catch {
return event; // Don't block on errors
}
},
});3. Verify Integration
Trigger a test error that should be filtered:
// This common browser extension error should be filtered
throw new Error("ResizeObserver loop completed with undelivered notifications");Check your Sentry dashboard—the error should not appear.
4. Configure Filters (Optional)
In your NoiseGate dashboard:
- Enable/disable community patterns by category
- Adjust confidence threshold to control filter sensitivity
- Add custom patterns for app-specific noise
Next Steps
- API Reference — Full endpoint documentation
- Framework Guides — Next.js, React, Vue, Node.js examples
- Advanced Usage — Caching, hooks, and fallbacks