elastic-apm-http-client
Advanced tools
Changelog
v9.7.0
A number of changes were made to fix issues with the APM agent under heavy load and with a slow or non-responsive APM server. (#144)
A new maxQueueSize
config option is added (default 1024 for now) to
control how many events (transactions, spans, errors, metricsets)
will be queued before being dropped if events are incoming faster
than can be sent to APM server. This ensures the APM agent memory usage
does not grow unbounded.
JSON encoding of events (when uncorking) is done in limited size batches to control the amount of single chunk CPU eventloop blocking time. (See MAX_WRITE_BATCH_SIZE in Client._writev.) Internal stats are collected to watch for long(est) batch processing times.
The handling of individual requests to the APM Server intake API has
be rewritten to handle some error cases -- especially from a
non-responsive APM server -- and to ensure that only one intake
request is being performed at a time. Two new config options --
intakeResTimeout
and intakeResTimeoutOnEnd
-- have been added to
allow fine control over some parts of this handling. See the comment on
makeIntakeRequest
for the best overview.
Support for backoff on intake API requests has been implemented per https://github.com/elastic/apm/blob/main/specs/agents/transport.md#transport-errors
Started testing against node v15 in preparation for supporting the coming node v16.
Changelog
v9.6.0
Fix config initialization such that the keep-alive agent is used all the
time, as intended. Before this change the keep-alive HTTP(S) agent would only
be used if a second call to client.config(...)
was made. For the Elastic
APM Agent's usage of this
module, that was when any of the express, fastify, restify, hapi, or koa
modules was instrumented. (#139)
A compatibility note for direct users of this APM http-client:
Options passed to the
Writable
and http[s].Agent
constructors no longer include the full options object passed to the
Client constructor.
Therefore usage of undocumented options can no longer be used.
Changelog
v9.5.1
Fix possible crash when polling apm-server for config. Specifically it could happen with the Elastic Node.js APM agent when:
https://github.com/elastic/apm-agent-nodejs/issues/1749