Node.js trace and frontend-fragment correlation not working for some applications
search cancel

Node.js trace and frontend-fragment correlation not working for some applications

book

Article ID: 244750

calendar_today

Updated On:

Products

CA Application Performance Management SaaS

Issue/Introduction

We are getting traces and correlation on some applications but not all applications for node.js agent. 

On some applications an upgraded version of the apollo-server client where the non-working applications exist.

 

 

Environment

Release : SAAS

Component : Integration with APM

Cause

We could observe ESM Loader (src\main.js) was used to load the application (src\server.js). 

Unfortunately, the current probe agent does not support for ESM. Hence it was failing to load probes for GraphQL, Apollo Server etc.

Resolution

We have released new version ([email protected]).

The following command should work:  

exec ca-apm-run-esm src\server.js

If we are directly executing JS (opt/app-root/src/.npm-global/lib/node_modules/ca-apm-probe/bin/ca-apm-run-esm.js) file instead of executable file, we should start the command with node as below:

exec node /opt/app-root/src/.npm-global/lib/node_modules/ca-apm-probe/bin/ca-apm-run-esm.js src\server.js

This ESM solution is now part of GA release ([email protected])  as well.