Troubleshooting your native module build

Steps to troubleshoot if you see "NO Data" in the Node VM tab

Problem statement: You are getting No Data under the garbage collection and event loop graphs such as GC Pause Time, GC Pause Frequency, and Event Loop Ticks Per Minute.
Prerequisite: The Node.js agent version should be 3.0.0 or higher.



Solution:
The APM Insight Node.js agent compiles the native module on your deployment platform using the node-gyp package.

Follow the below requirements of the node-gyp package, without which you will not get the GC and event loop metrics.
  1. Depending on your operating system, you must have the following:
    1. On Unix
      1. Python v3.7, v3.8, v3.9, or v3.10
      2. Make environment
      3. A proper C/C++ compiler toolchain, like GCC

    2. On macOS
      1. Python v3.7, v3.8, v3.9, or v3.10
      2. Xcode Command Line tools

    3. On Windows
      1. Python v3.7, v3.8, v3.9, or v3.10
      2. Visual C++ Build environment

  2. If your NPM version is 5.2.0 or higher, the NPX comes pre-bundled with it. So, for versions below 5.2.0, you must install NPX separately.
Even if your native module build fails, you will still get memory and CPU-related metrics, but not the GC and event loop metrics.