Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method to destroy Rollbar instance with removing all event listeners #1050

Open
eemorozov opened this issue Nov 12, 2022 · 0 comments
Open

Comments

@eemorozov
Copy link

Hello.
I use Rollbar along with @rollbar/react. My React apps have 2 types: containers and sub-applications.
Containers dynamically load sub-applications. Each app has its own Rollbar project and therefore initialise separate Rollbar instance.
There can be situation when I navigate across apps (new app loaded and mounted, old unmounted).

Then if in some app unhandledrejection event is happened, Rollbar send event log requests for all previously opened apps (even if they are already unmounted).
The reason of that, I suppose, is here. We add global event listener and it's not removed.

Can we with some method totally destroy Rollbar instance (with ability to remove all event listeners)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant