File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/node/src/transports Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import type {
8
8
} from '@sentry/types' ;
9
9
import * as http from 'http' ;
10
10
import * as https from 'https' ;
11
- import * as createHttpsProxyAgent from 'https-proxy-agent' ;
11
+ import * as httpsProxyAgent from 'https-proxy-agent' ;
12
12
import { Readable } from 'stream' ;
13
13
import { URL } from 'url' ;
14
14
import { createGzip } from 'zlib' ;
@@ -75,7 +75,8 @@ export function makeNodeTransport(options: NodeTransportOptions): Transport {
75
75
// TODO(v7): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node
76
76
// versions(>= 8) as they had memory leaks when using it: #2555
77
77
const agent = proxy
78
- ? createHttpsProxyAgent ( proxy )
78
+ ? // @ts -ignore this actually is a constructor but the library exports it super weirdly
79
+ ( new httpsProxyAgent ( proxy ) as http . Agent )
79
80
: new nativeHttpModule . Agent ( { keepAlive, maxSockets : 30 , timeout : 2000 } ) ;
80
81
81
82
const requestExecutor = createRequestExecutor ( options , options . httpModule ?? nativeHttpModule , agent ) ;
You can’t perform that action at this time.
0 commit comments