File tree Expand file tree Collapse file tree 3 files changed +16
-13
lines changed
packages/node-experimental/src Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export const Integrations = {
21
21
...NodeExperimentalIntegrations ,
22
22
} ;
23
23
24
- export { init } from './sdk/init' ;
24
+ export { init , getDefaultIntegrations } from './sdk/init' ;
25
25
export { getAutoPerformanceIntegrations } from './integrations/getAutoPerformanceIntegrations' ;
26
26
export * as Handlers from './sdk/handlers' ;
27
27
export type { Span } from './types' ;
@@ -40,7 +40,8 @@ export {
40
40
setIsolationScope ,
41
41
setCurrentScope ,
42
42
} from './sdk/api' ;
43
- export { getCurrentHub , makeMain } from './sdk/hub' ;
43
+ // eslint-disable-next-line deprecation/deprecation
44
+ export { getCurrentHub } from './sdk/hub' ;
44
45
45
46
export {
46
47
addBreadcrumb ,
@@ -88,6 +89,14 @@ export {
88
89
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN ,
89
90
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE ,
90
91
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE ,
92
+ setCurrentClient ,
93
+ Scope ,
94
+ setMeasurement ,
95
+ continueTrace ,
96
+ cron ,
97
+ parameterize ,
98
+ // eslint-disable-next-line deprecation/deprecation
99
+ makeMain ,
91
100
} from '@sentry/node' ;
92
101
93
102
export type {
@@ -108,4 +117,5 @@ export type {
108
117
Stacktrace ,
109
118
Thread ,
110
119
User ,
120
+ NodeOptions ,
111
121
} from '@sentry/node' ;
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export class SentryContextManager extends AsyncLocalStorageContextManager {
34
34
const scopes : CurrentScopes = { scope : newCurrentScope , isolationScope } ;
35
35
36
36
// We also need to "mock" the hub on the context, as the original @sentry/opentelemetry uses that...
37
+ // eslint-disable-next-line deprecation/deprecation
37
38
const mockHub = { ...getCurrentHub ( ) , getScope : ( ) => scopes . scope } ;
38
39
39
40
const ctx1 = setHubOnContext ( context , mockHub ) ;
Original file line number Diff line number Diff line change @@ -29,11 +29,13 @@ import type { SentryCarrier } from './types';
29
29
/** Ensure the global hub is our proxied hub. */
30
30
export function setupGlobalHub ( ) : void {
31
31
const carrier = getGlobalCarrier ( ) ;
32
+ // eslint-disable-next-line deprecation/deprecation
32
33
carrier . hub = getCurrentHub ( ) ;
33
34
}
34
35
35
36
/**
36
37
* This is for legacy reasons, and returns a proxy object instead of a hub to be used.
38
+ * @deprecated Use the methods directly.
37
39
*/
38
40
export function getCurrentHub ( ) : Hub {
39
41
return {
@@ -124,17 +126,6 @@ export function getCurrentHub(): Hub {
124
126
} ;
125
127
}
126
128
127
- /**
128
- * Replaces the current main hub with the passed one on the global object
129
- *
130
- * @returns The old replaced hub
131
- */
132
- export function makeMain ( hub : Hub ) : Hub {
133
- // eslint-disable-next-line no-console
134
- console . warn ( 'makeMain is a noop in @sentry/node-experimental. Use `setCurrentClient` instead.' ) ;
135
- return hub ;
136
- }
137
-
138
129
/**
139
130
* Sends the current Session on the scope
140
131
*/
@@ -152,6 +143,7 @@ function _sendSessionUpdate(): void {
152
143
* Set a mocked hub on the current carrier.
153
144
*/
154
145
export function setLegacyHubOnCarrier ( carrier : SentryCarrier ) : boolean {
146
+ // eslint-disable-next-line deprecation/deprecation
155
147
carrier . hub = getCurrentHub ( ) ;
156
148
return true ;
157
149
}
You can’t perform that action at this time.
0 commit comments