Only the first shallow call of a sequence of calls is recorded on shallow mode
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- observability
Research direction
Start in lib/appmap/hook/method.rb at the shallow-package check around line 98, then reproduce the Calc example using minutes.ago and year.ago. Inspect how AppMap.tracing tracks the last package and evaluate a stack-based approach so every shallow call is recorded, including both ago invocations.
Written by the indexing model from the issue text.
Description
While implementing the shallow mode for appmap-node agent I noticed this and it's been checked by @dividedmind:
I just checked and for example
require 'active_support/core_ext'
class Calc
def calc x
y = x.minutes.ago
z = 1.year.ago
y.to_i - z.to_i
end
end
indeed only records #minutes, ignoring #year and both invocations of #ago.
It seems that the problem is with this line return false if hook_package&.shallow? && AppMap.tracing.last_package_for_current_thread == hook_package
that checks the last recorded package. Because no other package is recorded between the calls mentioned, the last package stays the same. This causes subsequent calls to be skipped from recording, even if they are also "shallow" calls. A stack based approach can be used to fix this.
- Dominant language
- Ruby
- Stars
- 101
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getappmap/appmap-ruby
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
getappmap/appmap-ruby#363 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
getappmap/appmap-ruby#360 ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 45/100
getappmap/appmap-ruby#357 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
getappmap/appmap-ruby#344 · 2 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
getappmap/appmap-ruby#340 ·
All issues in getappmap/appmap-ruby
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
バグ
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
voxpupuli/puppet-epel#186 · 1 comment ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OpenBug Frontend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100