Skip to content

Commit 0613df3

Browse files
AbhiPrasadLms24
authored andcommitted
feat(hub): Remove getActiveDomain (#4858)
Removes `getActiveDomain` function and corresponding type.
1 parent caeb9e7 commit 0613df3

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

packages/hub/src/hub.ts

-23
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,6 @@ export interface Carrier {
8080
};
8181
}
8282

83-
/**
84-
* @hidden
85-
* @deprecated Can be removed once `Hub.getActiveDomain` is removed.
86-
*/
87-
export interface DomainAsCarrier extends Carrier {
88-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
89-
members: { [key: string]: any }[];
90-
}
91-
9283
/**
9384
* @inheritDoc
9485
*/
@@ -559,20 +550,6 @@ export function getCurrentHub(): Hub {
559550
return getHubFromCarrier(registry);
560551
}
561552

562-
/**
563-
* Returns the active domain, if one exists
564-
* @deprecated No longer used; remove in v7
565-
* @returns The domain, or undefined if there is no active domain
566-
*/
567-
// eslint-disable-next-line deprecation/deprecation
568-
export function getActiveDomain(): DomainAsCarrier | undefined {
569-
IS_DEBUG_BUILD && logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');
570-
571-
const sentry = getMainCarrier().__SENTRY__;
572-
573-
return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
574-
}
575-
576553
/**
577554
* Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
578555
* @returns discovered hub

packages/hub/src/index.ts

-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@ export { addGlobalEventProcessor, Scope } from './scope';
22
export { Session } from './session';
33
export { SessionFlusher } from './sessionflusher';
44
export {
5-
// eslint-disable-next-line deprecation/deprecation
6-
getActiveDomain,
75
getCurrentHub,
86
getHubFromCarrier,
97
getMainCarrier,
108
Hub,
119
makeMain,
1210
setHubOnCarrier,
1311
Carrier,
14-
// eslint-disable-next-line deprecation/deprecation
15-
DomainAsCarrier,
1612
Layer,
1713
} from './hub';

0 commit comments

Comments
 (0)