File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change 1
1
import type { Integration } from '@sentry/types' ;
2
2
import { GLOBAL_OBJ } from '@sentry/utils' ;
3
3
import type { AsyncContextStrategy } from './asyncContext/types' ;
4
+ import { SDK_VERSION } from './version' ;
4
5
5
6
/**
6
7
* An object that contains a hub and maintains a scope stack.
7
8
* @hidden
8
9
*/
9
10
export interface Carrier {
10
- __SENTRY__ ?: SentryCarrier ;
11
+ __SENTRY__ ?: VersionedCarrier ;
11
12
}
12
13
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 ;
23
17
}
24
18
25
19
interface SentryCarrier {
@@ -52,8 +46,11 @@ export function getMainCarrier(): Carrier {
52
46
export function getSentryCarrier ( carrier : Carrier ) : SentryCarrier {
53
47
if ( ! carrier . __SENTRY__ ) {
54
48
carrier . __SENTRY__ = {
55
- extensions : { } ,
49
+ version : SDK_VERSION ,
50
+ [ SDK_VERSION ] : {
51
+ extensions : { } ,
52
+ } ,
56
53
} ;
57
54
}
58
- return carrier . __SENTRY__ ;
55
+ return carrier . __SENTRY__ [ SDK_VERSION ] ;
59
56
}
You can’t perform that action at this time.
0 commit comments