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

fix: Call bindClient in the hub #2665

Merged
merged 6 commits into from Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,8 @@
- [react] feat: Add @sentry/react package (#2631)
- [react] feat: Add Error Boundary component (#2647)
- [react] feat: Add useProfiler hook (#2659)
- [core] feat: Export `makeMain` (#2665)
kamilogorek marked this conversation as resolved.
Show resolved Hide resolved
- [core] fix: Call `bindClient` when creating new `Hub` to make integrations work automatically (#2665)

## 5.17.0

Expand Down
1 change: 1 addition & 0 deletions packages/browser/src/exports.ts
Expand Up @@ -25,6 +25,7 @@ export {
getHubFromCarrier,
getCurrentHub,
Hub,
makeMain,
Scope,
startTransaction,
setContext,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Expand Up @@ -13,7 +13,7 @@ export {
setUser,
withScope,
} from '@sentry/minimal';
export { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, Scope } from '@sentry/hub';
export { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, makeMain, Scope } from '@sentry/hub';
export { API } from './api';
export { BaseClient } from './baseclient';
export { BackendClass, BaseBackend } from './basebackend';
Expand Down
1 change: 1 addition & 0 deletions packages/hub/src/hub.ts
Expand Up @@ -61,6 +61,7 @@ export class Hub implements HubInterface {
*/
public constructor(client?: Client, scope: Scope = new Scope(), private readonly _version: number = API_VERSION) {
this._stack.push({ client, scope });
this.bindClient(client);
}

/**
Expand Down
1 change: 1 addition & 0 deletions packages/node/src/index.ts
Expand Up @@ -25,6 +25,7 @@ export {
getHubFromCarrier,
getCurrentHub,
Hub,
makeMain,
Scope,
startTransaction,
setContext,
Expand Down