getappmap / appmap-agent-js

This project is deprecated. Please use https://github.com/getappmap/appmap-node/ to record Node.js applications.
Other
28 stars 8 forks source link

PM2 start no process recording? APPMAP-ERROR missing track "process-389gogbo" #248

Open on21life opened 1 year ago

on21life commented 1 year ago

SITUATION

1.npx appmap-agent-js with pm2 :

npx appmap-agent-js --command="pm2 start ecosystem.config.js" --recorder=process
  1. exit process:
    pm2 stop
    pm2 delete
    pm2 kill
  2. error message OCCURED : APPMAP-ERROR missing track "process-389gogbo"

For reference, the 389gogbo part of APPMAP-ERROR missing track "process-389gogbo" is a random value that changes for each process kill.

I launch my app by PM2, with 1 instance & nowatch, norestart option but when I killed pm2, it occurred like error message bellow: got the error message below:

full error message :

APPMAP-ERROR missing track "process-389gogbo"

[appmap@14.2.0] Detected an internal appmap error. This is probably an issue with how the AppMap agent is being used. Please consider submitting a bug report at: https://github.com/getappmap/appmap-agent-js/issues

file:///own-project/node_modules/@appland/appmap-agent-js/dist/bundles/server.mjs:227 throw new Constructor(message); ^

InternalAppmapError: backend error at assert (file:///own-project/node_modules/@appland/appmap-agent-js/dist/bundles/server.mjs:227:11) at sendBackendAssert (file:///own-project/node_modules/@appland/appmap-agent-js/dist/bundles/server.mjs:5439:3) at Socket. (file:///own-project/node_modules/@appland/appmap-agent-js/dist/bundles/server.mjs:5468:9) at Socket.emit (node:events:525:35) at TCP. (node:net:322:12)

Node.js v18.16.0

How I tried to solve it but failed

  1. add pm2 save command:
    pm2 kill
    pm2 save
  2. run again:
    npx appmap-agent-js --command="pm2 start ecosystem.config.js" --recorder=process

Hope

Please support PM2 compatibility for APPMAP THANKS

brikelly commented 1 year ago

Hi @on21life , thank you for filing this detailed issue, it's appreciated.

Does AppMap work correctly for you when you run the same command directly with Node (without pm2)?

Right now we don't officially support pm2, but we will look into it to see if it's something that could be offered.

on21life commented 1 year ago

Hi @on21life , thank you for filing this detailed issue, it's appreciated.

Does AppMap work correctly for you when you run the same command directly with Node (without pm2)?

Right now we don't officially support pm2, but we will look into it to see if it's something that could be offered.

Hi @brikelly, Yes, It does work correctly without pm2!