Node Performance - Disable Instrumentation by Function?


We have a Node application instrumented w/ the Elastic APM library and configured to send data to an Elastic Cloud deployment. This has been working just fine for months. Recently, a change was made to our application which involved adding a hot path to normal execution. This change has significantly negatively affected application performance. We have adjusted just about every configuration setting methodically with no luck.

Is there any way to tell the Node APM package to completely ignore instrumentation of specific functions - or something similar? We haven't had any luck with the disableInstrumentations parameter for the package responsible for making most of the new calls in requests.


This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Sorry for the late reply. I moved it to the sub forum that gets monitored by the Node.js devs. Is this question still relevant?

What kind of hot path did you add? Does it involve an outgoing network call, such as MySql or HTTP?

Which version of the Node.js agent are you using? Try updating to the latest version as we recently implemented some performance improvements.

Specifically versions 3.14.0 and 3.16.0 (Node.js Agent version 3.x | APM Node.js Agent Reference [3.x] | Elastic) included performance improvements that could be related to what you are seeing.

As a guess, the captureSpanStackTraces=false configuration option might help. However, we would more details to be sure. If your new hot path includes creating many more tracing spans than before, then captureSpanStackTraces can often be a bottleneck.

The recently added Configuration options | APM Node.js Agent Reference [3.x] | Elastic configuration option might help if the new hot path creates very short duration spans that you want to exclude from trace reporting.