sentry-javascript: @sentry/browser no-conflict mode
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- [] Use the latest release: https://github.com/getsentry/sentry-javascript/releases
Package + Version
-
@sentry/browser -
@sentry/node -
raven-js -
raven-node(raven for node) - other:
Version:
4.0.6
Description
App that I am working on uses @sentry/browser SDK and was installed based on the documentation. The problem is that app can be integrated into other apps which have Sentry as well, so I will get conflicts. I didn’t find any information about no-conflict mode like it is implemented in Raven.js. The question is - does @sentry/browser SDK supports no-conflict mode like “Sentry.noConflict()” and if so how can I execute it?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (6 by maintainers)
We also are having a similar issue where our React App is hosted as a super-widget inside a larger app that also uses Sentry. However we need to automatically capture and send our errors to our own separate DSN. I will try @chocking solution above, but would appreciate any additional help anyone could provide. Thanks!
I think what you really want to do is, instead of calling
inityou want to probably create your ownClientand send off your captured errors to your Sentry installation. If you callinitwe hook into a lot of global hooks, (error handler, unhandled promises, breadcrumbs) you would receive all event from the parent application which is on one hand a security concern and on the other hand it sends errors to you that may not be related in any form to your app.Creating your own
Clientworks the same as withinitIs that what you actually want?