Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ client.init(); // initializing has to be done after setting the client on the sc
scope.captureException(new Error("example"));
```

You can now customize the scope to your liking, without affecting other hubs/clients.
You can now customize the scope to your liking, without affecting other clients.

### Dealing with Integrations

Integrations are setup on the `Client`, if you need to deal with multiple clients and hubs you have to make sure to also do the integration handling correctly.
Integrations are set up on the `Client`. If you need to deal with multiple clients, you'll have to make sure the integration handling is set up correctly.

We do not recommend doing this if you are using Sentry in a browser extension or in similar scenarios.
If you can't avoid using global integrations (e.g. in a micro frontend application), here is a working example of how to use multiple clients with multiple scopes running global integrations.
Expand All @@ -91,7 +91,7 @@ function happyIntegration() {
setupOnce() {
Sentry.addEventProcessor((event) => {
const self = Sentry.getClient().getIntegration(HappyIntegration);
// Run the integration ONLY when it was installed on the current Hub
// Run the integration ONLY if it was installed on the current client
if (self) {
event.message = `\\o/ ${event.message} \\o/`;
}
Expand Down
Loading