Skip to content

Commit c8a9930

Browse files
fix: missing pr tidbits
1 parent e1fe39d commit c8a9930

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

.mocharc.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

.mocharc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require: 'ts-node/register'

experimental/packages/otlp-exporter-base/src/transport/http-exporter-transport.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,18 @@ class HttpExporterTransport implements IExporterTransport {
6060

6161
if (utils === null) {
6262
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 };
6768
}
6869

6970
return utils;
7071
}
7172
}
7273

73-
async function requestFactory(
74+
async function requestFunctionFactory(
7475
protocol: string
7576
): Promise<typeof http.request | typeof https.request> {
7677
const module = protocol === 'http:' ? import('http') : import('https');

ts-node.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)