Node.js is a popular platform to write server-side applications. Profiling Node.js based application is supported out of the box with Polar Signals Cloud.
--perf-basic-prof-only-functions flag must be passed to the
For better quality we also recommend to pass the
For example the full command might look like this:
node --perf-basic-prof-only-functions --interpreted-frames-native-stack main.js
Below are some situations and how to troubleshoot them. If you've tried these and still haven't been able to resolve the issue, please contact support.
Only functions broken
For a long time
--perf-basic-prof-only-functions was broken and resulted in incomplete data, ensure you are using a new enough version that fixes it.
The fix is not being backported for v16. Use
All I can see is memory addresses
First make sure the node process is started with the
Then check that the process is successfully writing a perfmap.
By default, perfmaps are written to
On Kubernetes for example this can be checked with:
kubectl exec --namespace <namespace-name> <pod-name> -- ls -la /tmp
$ kubectl exec -n default nodejs-demo -- ls -la /tmp
drwxrwxrwt 1 root root 4096 Jul 12 08:59 .
drwxr-xr-x 1 root root 4096 Jul 12 08:59 ..
-rw-r--r-- 1 root root 131811 Jul 12 08:59 perf-1.map
drwxr-xr-x 3 root root 4096 Jul 4 17:33 v8-compile-cache-0
In this example the file we're looking for is the
For you it should be called something similar.