@@ -3,14 +3,15 @@ import { hostname } from 'os';
3
3
import { basename , resolve } from 'path' ;
4
4
import { types } from 'util' ;
5
5
/* eslint-disable max-lines */
6
- import type { Scope } from '@sentry/node' ;
7
- import * as Sentry from '@sentry/node' ;
6
+ import { NodeOptions , SDK_VERSION , Scope } from '@sentry/node' ;
8
7
import {
9
8
captureException ,
10
9
captureMessage ,
11
10
continueTrace ,
11
+ defaultIntegrations as nodeDefaultIntegrations ,
12
12
flush ,
13
13
getCurrentScope ,
14
+ init as initNode ,
14
15
startSpanManual ,
15
16
withScope ,
16
17
} from '@sentry/node' ;
@@ -63,9 +64,9 @@ export interface WrapperOptions {
63
64
startTrace : boolean ;
64
65
}
65
66
66
- export const defaultIntegrations : Integration [ ] = [ ...Sentry . defaultIntegrations , new AWSServices ( { optional : true } ) ] ;
67
+ export const defaultIntegrations : Integration [ ] = [ ...nodeDefaultIntegrations , new AWSServices ( { optional : true } ) ] ;
67
68
68
- interface AWSLambdaOptions extends Sentry . NodeOptions {
69
+ interface AWSLambdaOptions extends NodeOptions {
69
70
/**
70
71
* Internal field that is set to `true` when init() is called by the Sentry AWS Lambda layer.
71
72
*
@@ -74,7 +75,7 @@ interface AWSLambdaOptions extends Sentry.NodeOptions {
74
75
}
75
76
76
77
/**
77
- * @see {@link Sentry. init }
78
+ * @see {@link init }
78
79
*/
79
80
export function init ( options : AWSLambdaOptions = { } ) : void {
80
81
const opts = {
@@ -89,13 +90,13 @@ export function init(options: AWSLambdaOptions = {}): void {
89
90
packages : [
90
91
{
91
92
name : 'npm:@sentry/serverless' ,
92
- version : Sentry . SDK_VERSION ,
93
+ version : SDK_VERSION ,
93
94
} ,
94
95
] ,
95
- version : Sentry . SDK_VERSION ,
96
+ version : SDK_VERSION ,
96
97
} ;
97
98
98
- Sentry . init ( opts ) ;
99
+ initNode ( opts ) ;
99
100
}
100
101
101
102
/** */
0 commit comments