File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,12 @@ import {
16
16
/**
17
17
* This is for legacy reasons, and returns a proxy object instead of a hub to be used.
18
18
*
19
- * @deprecated Use the methods directly.
19
+ * @deprecated Use the methods directly from the top level Sentry API (e.g. `Sentry.withScope`)
20
+ * For more information see our migration guide for
21
+ * [replacing `getCurrentHub` and `Hub`](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#deprecate-hub)
22
+ * usage
20
23
*/
24
+ // eslint-disable-next-line deprecation/deprecation
21
25
export function getCurrentHubShim ( ) : Hub {
22
26
return {
23
27
bindClient ( client : Client ) : void {
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ export function setOpenTelemetryContextAsyncContextStrategy(): void {
40
40
} ;
41
41
}
42
42
43
+ // eslint-disable-next-line deprecation/deprecation
43
44
function getCurrentHub ( ) : Hub {
44
45
// eslint-disable-next-line deprecation/deprecation
45
46
const hub = getCurrentHubShim ( ) ;
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ export function setAsyncLocalStorageAsyncContextStrategy(): void {
51
51
} ;
52
52
}
53
53
54
+ // eslint-disable-next-line deprecation/deprecation
54
55
function getCurrentHub ( ) : Hub {
55
56
// eslint-disable-next-line deprecation/deprecation
56
57
const hub = getCurrentHubShim ( ) ;
You can’t perform that action at this time.
0 commit comments