getappmap / getappmap/appmap-python

uninstrumented functions may be called

Open
#365 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

navie-plan
Dominant language
Python
Stars
104
Forks
17
PR merge metrics
No merged PRs in 30d

Description

If application code saves a reference to function when the code is imported, a call to that function won't generate any events in the recording.

For example, with this definition

def free_method():
    return "free method"

def Example:
    static_method = staticmethod(partial(free_method))

Example.static_method()

no events for the call to free_method will be recorded. This is because instrumentation of free_method happens after the module is loaded, and so after the call to partial(free_method)) has saved the reference to free_method.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the Python reproducer in the issue as the starting point, then trace when instrumentation is applied relative to references saved by partial and staticmethod. Done means calls through those saved references generate events in the recording, with the reproducer covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.