What version of OpenTelemetry are you using?
v0.14.0
What version of Node are you using?
12
This code from collector exporter creates a new Agent for each HTTP export request via the collector exporter:
export function sendWithHttp<ExportItem, ServiceRequest>(...): void {
...
const request = parsedUrl.protocol === 'http:' ? http.request : https.request;
const Agent = parsedUrl.protocol === 'http:' ? http.Agent : https.Agent;
if (collector.keepAlive) {
options.agent = new Agent({
...collector.httpAgentOptions,
keepAlive: true,
});
}
const req = request(options, (res: http.IncomingMessage) => {
I might be missing something, but shouldn't all the HTTP requests reuse the same Agent, in order to benefit from its connection persistence and reuse?