We are instrumenting a nodejs backend with Elastic APM agent. At some point, the elastic server cannot cope with the incoming messages from the agent. I wonder what happens in that case. I understand that such incoming messages will be dropped, and the backend CPU load will not be affected because of this.
Generally speaking, what CPU load can the agent induce in the backend?
That is a hard question to quantify in general. Often it depends a lot on the application being instrumented. Some disorganized thoughts:
The async_hooks mechanism that the agent uses does definitely have some overhead on the application. From recent anecdotal observations, if the application is very heavy on async operations (lots of timers, nextTick, setImmediate, and especially Promise usage), that overhead can be higher.
If you are experiencing too-high CPU overhead from the agent, my first suggestions would be to consider setting transactionSampleRate (Configuration options | APM Node.js Agent Reference [master] | Elastic) to a value less than 1, and captureSpanStackTraces=false (Configuration options | APM Node.js Agent Reference [master] | Elastic). If the application produces lots of spans, the latter can help a lot. Coming versions of the agent will have some improvements on stacktrace collection overhead and will probably change default settings to not capture stacktraces for all spans (likely just for slower ones).
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.