One django webapp reporting to different sentry projects

Hi there - I have a django webapp reporting Exceptions and also javascript errors into a single sentry project. Lately we integrated another javascript library from another team and want that reporting to a different sentry project.

In django: RAVEN_CONFIG = { 'dsn': '12345xxx_with_username:password@host' }
and in the template we configure the public dsn matching the 12345 dsn.

I created the new project in sentry, but I assume that just reconfiguring the public dsn in the template to match the new projects public dsn will result in an error.

Is my assumption wrong? If not, how do I configure the splitted reporting?

You likely don’t want them in separate projects unless they’re actually separate services (which it doesnt seem like is the case). If you hold out for another few weeks we’ll have a solution that helps out your use case immensely.

If you did still want to do this, you’d want to make sure you only initialize Raven once (I’m not sure if you can even do it twice), and set the DSN to the project you want at that point in time.

Actually, they are separate services/projects in our company.

Not sure how that’s gonna work - we have some load on our site, concurrent users and resetting DSN for every event might result in race conditions…

Maybe I was unclear in the first question.

I want all server errors captured in one sentry project and all javascript project captured in another one.

Does it suffice to change the public DSN entry in the template setup for raven?

I’ll answer that question myself: It does suffice to change the public DSN