Capture exceptions for multiple projects in Unified Browser SDK
- [x] Review the documentation: https://docs.sentry.io/
- [x] Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- [x] Use the latest release: https://github.com/getsentry/sentry-javascript/releases
Package + Version
- [x]
@sentry/browser - [ ]
@sentry/node - [ ]
raven-js - [ ]
raven-node(raven for node) - [ ] other:
Version:
4.4.1
Description
I have two bundles getting loaded in the same web application. Both are separately maintained and versioned. I also want to track errors separately. Can I enclose the code execution in two different Sentry instances, so that exceptions for both bundles are logged under respective projects in sentry?
In raven-js, there was some facility like this:
Raven.context(function () {
myCode();
});
@sahilanguralla yes, you can :)
Here are the docs for your usage https://docs.sentry.io/platforms/javascript/advance-settings/#using-a-client-directly
Cheers!
The above link seems to be broken, here is a working one: https://docs.sentry.io/platforms/javascript/troubleshooting/#using-a-client-directly