Skip to content
Bugtail Docs
Menu

Browser filtering

A public web page runs a lot of code its owner did not write: browser extensions, password managers, tag managers, analytics and chat widgets. When they throw, the error lands in the same handler as yours and looks exactly like a bug in your application. Two settings on a collector keep that out. Both are under Browser filtering on the collector, in Settings > Projects and collectors.

Your script hosts

List the hosts that serve your own JavaScript, one per line:

app.example.com
*.cdn.example.com

Bugtail then keeps a browser error only when at least one frame of its stack trace comes from one of those hosts.

  • *.example.com matches the domain and everything under it. Ports are ignored.
  • Leave the list empty to turn the filter off. Every collector starts that way.
  • Only browser errors are judged. Errors from your servers are never affected.
  • An error whose stack names no file at all is dropped. That is the Script error. a browser reports for a script from another site, and there is nothing in it to fix.
  • A stack with file names but no hosts, such as app:///src/checkout.js, is kept. Some bundler plugins write frames that way, and they are your own code.
  • Messages you send yourself with captureMessage() are always kept.

List the host that serves your bundle, not the one your sources came from: the filter looks at stack traces before source maps are applied.

Allowed origins

The key of a browser collector is in your bundle, so any other site could copy it and send events with it. List the sites whose pages may send to the collector:

www.example.com
*.staging.example.com
  • *.example.com matches the domain and everything under it. A scheme, a path and a port are ignored, so a pasted URL works.
  • Leave the list empty, or add *, to accept every site. Every collector starts that way.
  • Once the list is filled in, requests without an origin, such as those from a server, are refused. Use a separate collector for your server.
  • Refused requests get a 403. They count towards the collector's rate limit, but not towards your plan.
  • Uploading source maps is not affected.

This keeps other people's pages out. It is not a lock: a script outside a browser can claim any origin it likes.

Nothing disappears unseen

Both filters count what they refuse, per host or per site, and show the past week of it on the collector. A host you forgot to list, such as a new CDN or a www you left out, turns up there with a growing count. Allow adds it to the list; it takes effect once you save.