Skip to content

Commit

Permalink
style(exporter-collector): object spread undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
blumamir committed Jan 24, 2021
1 parent eca81a4 commit f57a562
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ export function createHttpAgent(

try {
const parsedUrl = new url.URL(config.url as string);
const httpAgentOptions = config.httpAgentOptions ?? {};
const Agent = parsedUrl.protocol === 'http:' ? http.Agent : https.Agent;
return new Agent({ keepAlive: true, ...httpAgentOptions });
return new Agent({ keepAlive: true, ...config.httpAgentOptions });
} catch (err) {
logger.error(
`collector exporter failed to create http agent. err: ${err.message}`
Expand Down

0 comments on commit f57a562

Please sign in to comment.