Raven.js integration : multiple installs


Here is our use case :

  1. We want to track errors from the page load, so we do a first init and install() using a specific DSN
  2. Depending on the user browser / device, we then load different internal libraries and we want to track issues separately using specific DSNs.

Will it trigger some issues to do a second install() with another DSN ? If so, how can I manage to update the DSN ?

On a side-note I’m executing this code right after the install to capture all exceptions to Sentry :

window.onerror = function(messageOrEvent, source, lineno, colno, error) {

Is it required or is this the default behaviour of Sentry ?

Thanks for your help :slight_smile:

I don’t think you need window.onerror.

Simply configure raven to capture unhandled errors will be enough.

1 Like