File tree Expand file tree Collapse file tree 4 files changed +7
-16
lines changed
experimental/packages/otlp-exporter-base/src/transport Expand file tree Collapse file tree 4 files changed +7
-16
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ require : ' ts-node/register'
Original file line number Diff line number Diff line change @@ -60,17 +60,18 @@ class HttpExporterTransport implements IExporterTransport {
60
60
61
61
if ( utils === null ) {
62
62
const protocol = new URL ( this . _parameters . url ) . protocol ;
63
- utils = this . _utils = {
64
- agent : await this . _parameters . agentFactory ( protocol ) ,
65
- request : await requestFactory ( protocol ) ,
66
- } ;
63
+ const [ agent , request ] = await Promise . all ( [
64
+ this . _parameters . agentFactory ( protocol ) ,
65
+ requestFunctionFactory ( protocol ) ,
66
+ ] ) ;
67
+ utils = this . _utils = { agent, request } ;
67
68
}
68
69
69
70
return utils ;
70
71
}
71
72
}
72
73
73
- async function requestFactory (
74
+ async function requestFunctionFactory (
74
75
protocol : string
75
76
) : Promise < typeof http . request | typeof https . request > {
76
77
const module = protocol === 'http:' ? import ( 'http' ) : import ( 'https' ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments