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 {
1616/**
1717 * This is for legacy reasons, and returns a proxy object instead of a hub to be used.
1818 *
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
2023 */
24+ // eslint-disable-next-line deprecation/deprecation
2125export function getCurrentHubShim ( ) : Hub {
2226 return {
2327 bindClient ( client : Client ) : void {
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ export function setOpenTelemetryContextAsyncContextStrategy(): void {
4040 } ;
4141 }
4242
43+ // eslint-disable-next-line deprecation/deprecation
4344 function getCurrentHub ( ) : Hub {
4445 // eslint-disable-next-line deprecation/deprecation
4546 const hub = getCurrentHubShim ( ) ;
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ export function setAsyncLocalStorageAsyncContextStrategy(): void {
5151 } ;
5252 }
5353
54+ // eslint-disable-next-line deprecation/deprecation
5455 function getCurrentHub ( ) : Hub {
5556 // eslint-disable-next-line deprecation/deprecation
5657 const hub = getCurrentHubShim ( ) ;
You can’t perform that action at this time.
0 commit comments