Skip to content

Commit c0c2136

Browse files
committed
wip
1 parent a87af78 commit c0c2136

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

packages/core/src/carrier.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
import type { Integration } from '@sentry/types';
22
import { GLOBAL_OBJ } from '@sentry/utils';
33
import type { AsyncContextStrategy } from './asyncContext/types';
4+
import { SDK_VERSION } from './version';
45

56
/**
67
* An object that contains a hub and maintains a scope stack.
78
* @hidden
89
*/
910
export interface Carrier {
10-
__SENTRY__?: SentryCarrier;
11+
__SENTRY__?: VersionedCarrier;
1112
}
1213

13-
interface SentryCarrier {
14-
acs?: AsyncContextStrategy;
15-
}
16-
17-
/**
18-
* An object that contains a hub and maintains a scope stack.
19-
* @hidden
20-
*/
21-
export interface Carrier {
22-
__SENTRY__?: SentryCarrier;
14+
interface VersionedCarrier {
15+
version: typeof SDK_VERSION;
16+
[SDK_VERSION]: SentryCarrier;
2317
}
2418

2519
interface SentryCarrier {
@@ -52,8 +46,11 @@ export function getMainCarrier(): Carrier {
5246
export function getSentryCarrier(carrier: Carrier): SentryCarrier {
5347
if (!carrier.__SENTRY__) {
5448
carrier.__SENTRY__ = {
55-
extensions: {},
49+
version: SDK_VERSION,
50+
[SDK_VERSION]: {
51+
extensions: {},
52+
},
5653
};
5754
}
58-
return carrier.__SENTRY__;
55+
return carrier.__SENTRY__[SDK_VERSION];
5956
}

0 commit comments

Comments
 (0)