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
docs(hub): 📝 multi-hub integrations setup #1689
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -85,6 +85,8 @@ const client1 = new Sentry.BrowserClient({ | |||||||||||||
return null; // Returning null does not send the event | ||||||||||||||
} | ||||||||||||||
}); | ||||||||||||||
client1.setupIntegrations(); | ||||||||||||||
|
||||||||||||||
const hub1 = new Sentry.Hub(client1); | ||||||||||||||
|
||||||||||||||
const client2 = new Sentry.BrowserClient({ | ||||||||||||||
|
@@ -95,6 +97,8 @@ const client2 = new Sentry.BrowserClient({ | |||||||||||||
return null; // Returning null does not send the event | ||||||||||||||
} | ||||||||||||||
}); | ||||||||||||||
client2.setupIntegrations(); | ||||||||||||||
|
||||||||||||||
const hub2 = new Sentry.Hub(client2); | ||||||||||||||
Comment on lines
+100
to
102
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is actually a bug, we should call bindClient in the Hub constructor. cc @kamilogorek There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||||||||
|
||||||||||||||
hub1.run(currentHub => { // The hub.run method makes sure that Sentry.getCurrentHub() returns this hub during the callback | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.