search cancel

Node.JS Not Seeing Frontends/Backends Metrics.


Article ID: 198158


Updated On:


CA Application Performance Management Agent (APM / Wily / Introscope) CA Application Performance Management (APM / Wily / Introscope) INTROSCOPE DX Application Performance Management


Customer is deploying NodeJS for first time.  The APMIA is up and listening, can verify that in Metric Viewer. No issues there. The probe is talking to APMIA, can see loop metrics and such from probe in Metric viewer.  Just not seeing any NodeJS Frontend and backends.  Customer is hitting the NodeJS URL.  





Node version 12.16.1

In a container.


CentOS Linux release 7.6.1810

Reporting to on-premise APM 10.7 sp3+.



There is an Exception:

 error: got exception: 'TypeError: Cannot read property 'tracePreviousCtx' of null' while executing 'before' trace logic in function: 'Object#unknown'
 debug: TypeError: Cannot read property 'tracePreviousCtx' of null
    at Agent.pushAsyncTracerEvent [as asynchEventStartHandler] (/opt/app-root/src/.npm-global/lib/node_modules/ca-apm-probe/lib/virtualstack.js:227:13)
    at Agent.asynchEventStart (/opt/app-root/src/.npm-global/lib/node_modules/ca-apm-probe/lib/agent.js:128:15)
    at /opt/app-root/src/.npm-global/lib/node_modules/ca-apm-probe/lib/probes/fs.js:47:25
    at Object.eval [as forward] (eval at recompile (/opt/app-root/src/.npm-global/lib/node_modules/ca-apm-probe/lib/proxy.js:279:10), <anonymous>:3:8)
    at eval (eval at wrap (/opt/app-root/src/.npm-global/lib/node_modules/ca-apm-probe/lib/proxy.js:218:15), <anonymous>:7:19)
    at (/opt/app-root/src/.npm-global/lib/node_modules/ca-apm-probe/node_modules/continuation-local-storage/context.js:48:5)
    at Object.eval [as readFile] (eval at wrap (/opt/app-root/src/.npm-global/lib/node_modules/ca-apm-probe/lib/proxy.js:218:15), <anonymous>:6:19)
    at /opt/app-root/services/cache/cacheservice.js:110:12
    at new WrappedPromise (/opt/app-root/src/.npm-global/lib/node_modules/ca-apm-probe/node_modules/async-listener/es6-wrapped-promise.js:13:18)
    at Object.getCacheById [as getrediscacheByKey] (/opt/app-root/services/cache/cacheservice.js:105:10)


This Exception also crashes the App, as I can see a restart each time after this Exception.



New code fix provided -- A patched VirtualStack.js to avoid this Exception. Look in DE474133

Additional Information

32161027/ DE474133 Ting helped resolve this.