How to track errors originating from one JS file only without disturbing anything else?

I’d like to be able to track errors from our JS file when it’s run on a 3rd party page. I need to do this without interfering with anything else on the page. Is this possible with sentry?

Detail: We have some code that embeds a widget on a page, I’d love to be able to get visibility into failures but since the code is on a 3p page that I have zero control over I have to be very careful not to break anything belonging to somebody else. Is this possible with sentry - if so how?

You may try whitelistUrls configuration option - not sure if it work (we added it but still see errors from different scripts)


Sorry to bring back an older post however I was curious if there was an alternative solution?

In my case I have a header and footer which may or may not throw errors that shouldn’t be logged in with my main code base (a bundled react project) is there a way to filter the origin of errors or only include errors from a specific file? I suspect not based on the answer above… perhaps a feature request?