You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked how axios and aws-sdk are using the agent.
It looks like they accept the agent as config parameter, rather than newing it in the library. This enables the user to configure it freely, and to share the connection pool and limits between multiple HTTP clients or exporters.
On the other hand, the user needs to be active about setting the use of agent, and it doesn't happen automatically by default.
// `httpAgent` and `httpsAgent` define a custom agent to be used when performing http// and https requests, respectively, in node.js. This allows options to be added like// `keepAlive` that are not enabled by default.httpAgent: newhttp.Agent({keepAlive: true}),httpsAgent: newhttps.Agent({keepAlive: true}),
…ions (open-telemetry#1840)
* docs(user-interaction): update docs to include examples of config options
* add example to prevent span creation
* fix lint
* address PR comments
* update link to list of events
* syntax updates
Co-authored-by: Martin Kuba <[email protected]>
---------
Co-authored-by: Martin Kuba <[email protected]>
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:
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?
The text was updated successfully, but these errors were encountered: