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

Missing functions in JS appmaps #210

Open ahtrotta opened 1 year ago

ahtrotta commented 1 year ago

I mapped cli in appmap-js and got some maps, but I noticed that many of them are missing functions. For example, the map from this test case is missing pruneWithFilter and displayMessage.

Image

For context, here is my appmap.yml file (this file is in packages/cli) that was generated by the JS agent:

packages:
  - regexp: ^../
    enabled: true 
  - regexp: (^|/)node_modules/
    enabled: true 
  - regexp: ""
    enabled: true
default-package:
  enabled: false
exclude:
  - combinator: and
    name: ^\[anonymous\]$
    every-label: ^\b$
    excluded: true
    recursive: false
log:
  level: info
ordering: chronological
serialization:
  impure-printing: false
  impure-constructor-naming: false
  impure-array-inspection: false
  impure-error-inspection: false
  impure-hash-inspection: false
appmap-dir: tmp
ahtrotta commented 1 year ago

Here's another example from this test. The map has locateAppMapDir, but then it doesn't capture the function call to appmapDirFromConfig from within locateApMapDir.

Image

lachrist commented 1 year ago

@ahtrotta The agent works by instrumenting function declarations not function applications. As you can imagine, changing that is big leap. Are the the functions pruneWithFilter and displayMessage declared in whitelisted file?

kgilpin commented 1 year ago

Why isn't the function call to appmapDirFromConfig from within locateApMapDir recorded?

On Wed, Apr 26, 2023 at 4:42 PM Laurent Christophe @.***> wrote:

@ahtrotta https://github.com/ahtrotta The agent works by instrumenting function declarations not function applications. As you can imagine, changing that is big leap. Are the the functions pruneWithFilter and displayMessage declared in whitelisted file?

— Reply to this email directly, view it on GitHub https://github.com/getappmap/appmap-agent-js/issues/210#issuecomment-1524019205, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC63HS6OOVMSYLZ4NLUTXDGCBRANCNFSM6AAAAAAWRYDQ2A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

lachrist commented 1 year ago

If it was not excluded, it is a bug.

kgilpin commented 1 year ago

Why? Can someone please explain in more than one line.

On Fri, Apr 28, 2023 at 3:18 PM Laurent Christophe @.***> wrote:

If it was not excluded, it is a bug.

— Reply to this email directly, view it on GitHub https://github.com/getappmap/appmap-agent-js/issues/210#issuecomment-1527989909, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC64SWQE6JPRJRXQT4JLXDQJZDANCNFSM6AAAAAAWRYDQ2A . You are receiving this because you commented.Message ID: @.***>