• Error Monitoring
  • Logs
  • Session Replay
  • Tracing
  • Seer
  • Uptime Monitoring
  • Profiling
  • Cron Monitoring
  • AI Code Review
  • Github
  • Slack
  • All Integrations
  • Javascript
  • Python
  • React
  • Laravel
  • Next.js
  • All SDKs

Solutions

  • Web / Frontend Development
  • Mobile Crash Reporting
  • Game Crash Reporting
  • AI Observability
  • Application Performance Monitoring
  • Real User Monitoring
  • Ecommerce
  • Enterprise
  • Blog
  • Changelog
  • Sandbox
  • Resources
  • Sentry Answers
  • Syntax
  • Customers
  • For Startups
  • Contact Us
  • Help Center
  • Status
  • Sentry Build
  • Events
  • Merch
Docs
Pricing
Sign InGet DemoGet Started
  • Products

    • Error Monitoring
    • LogsNEW
    • Session Replay
    • Tracing
    • SeerNEW
    • Uptime Monitoring
    • Profiling
    • Cron Monitoring
    • AI Code ReviewNEW

    Products

    • Error Monitoring
    • LogsNEW
    • Session Replay
    • Tracing
    • SeerNEW
    • Uptime Monitoring
    • Profiling
    • Cron Monitoring
    • AI Code ReviewNEW

    Integrations

    • Github
    • Slack
    • All Integrations

    Integrations

    • Github
    • Slack
    • All Integrations

    SDKs

    • Javascript
    • Python
    • React
    • Laravel
    • Next.js
    • All SDKs

    SDKs

    • Javascript
    • Python
    • React
    • Laravel
    • Next.js
    • All SDKs
  • Solutions

    • Web / Frontend Development
    • Mobile Crash Reporting
    • Game Crash Reporting
    • AI Observability
    • Application Performance Monitoring
    • Real User Monitoring
    • Ecommerce
    • Enterprise
  • Learn

    • Blog
    • Changelog
    • Sandbox
    • Resources
    • Sentry Answers
    • Syntax
    • Customers
    • For Startups

    Learn

    • Blog
    • Changelog
    • Sandbox
    • Resources
    • Sentry Answers
    • Syntax
    • Customers
    • For Startups

    Support

    • Contact Us
    • Help Center
    • Status

    Support

    • Contact Us
    • Help Center
    • Status

    Hang out with us

    • Sentry Build
    • Events
    • Merch

    Hang out with us

    • Sentry Build
    • Events
    • Merch
    Holiday E-Commerce Checklist: A Developer’s Survival Guide

    Holiday E-Commerce Checklist: A Developer’s Survival Guide

    There’s never a good time for errors or performance degradations to show up, but during periods of peak traffic like the holidays, it’s especially critical to get immediate answers about what's failing and how to fix it.

    Learn More
  • Docs
  • Pricing
Sign InGet DemoGet Started
Sentry Changelog Illustration

Sentry Changelog

Follow Twitter@SentryChangelog to stay up to date on everything from product updates to SDK changes.

Categories:

Jump to:

Ignore errors that don't come from your code

Loading...
June 25, 2024
Your code is broken. Let's Fix it.
Get Started

With Sentry's JavaScript SDK 8.10.0 release you have added new ways to reduce noise in your issue feed.

A lot of noisy errors come from JavaScript that wasn't written by yourself. Browser extensions, code-injecting browsers, or widgets from third-party services all may throw errors that you cannot address.

There are two possibilities to filter out these kinds of errors:

  1. Using the allowUrls and denyUrls options
  2. Using the thirdPartyErrorFilterIntegration (new and recommended)

Using allowUrls and denyUrls

You have been able to define an array of patterns matching the URLs of scripts where errors have been created. Only errors that match one of the patterns will be recorded and sent to Sentry. If your scripts are loaded from cdn.example.com and your site is example.com, you can set allowUrls to:

Sentry.init({
  allowUrls: [/https?:\/\/((cdn|www)\.)?example\.com/],
});

If you want to block errors from specific URLs you can use denyUrls.

Using the thirdPartyErrorFilterIntegration

The thirdPartyErrorFilterIntegration is an approach to automatically filter out errors that are unrelated to the code that you wrote.

This feature is available in all browser-based SDKs from version 8.10.0 onwards and requires you to use a bundler and one of .

Sentry's bundler plugins

This integration works by "marking" your JavaScript files with an "application key" during the build process. At runtime, if an error occurs, the thirdPartyErrorFilterIntegration checks application keys for each stack frame in the stack trace. This allows you to filter out errors with "unmarked" stack frames, which would indicate third-party code.

To get started using the thirdPartyErrorFilterIntegration check out the Docs.