Only the first shallow call of a sequence of calls is recorded on shallow mode
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 45/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- ruby
研究方向
從 lib/appmap/hook/method.rb 中第 98 行附近的淺層 package 檢查開始,接著使用 minutes.ago 和 year.ago 重現 Calc 範例。檢查 AppMap.tracing 如何追蹤上一個 package,並評估以 stack 為基礎的方法,讓每個淺層呼叫都能被記錄,包括兩個 ago 呼叫。
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Ruby
- 星號
- 101
- 分支
- 13
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
getappmap/appmap-ruby 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 30/100
getappmap/appmap-ruby#363 · 2 則留言 ·
-
難度 3/5 1-2 天 新手友好度 42/100
getappmap/appmap-ruby#360 ·
-
enhancement
難度 3/5 1-2 天 新手友好度 45/100
getappmap/appmap-ruby#357 ·
-
bug
難度 4/5 3-5 天 新手友好度 35/100
getappmap/appmap-ruby#344 · 2 則留言 · 1 個 reaction ·
-
難度 4/5 3-5 天 新手友好度 35/100
getappmap/appmap-ruby#340 ·
查看 getappmap/appmap-ruby 的全部 Issue
相似的 Issue
-
Add Zammad可能已有人在做 @Arslan-TR 今天認領。 未關閉request
難度 2/5 1-3 小時 新手友好度 66/100
endoflife-date/endoflife.date#11298 · 1 則留言 ·
維護者通常 1 天內回覆
-
performance v/6
難度 2/5 1-3 小時 新手友好度 78/100
WITCodingClub/calendar-backend#689 ·
維護者通常 1 天內回覆
-
bug
難度 1/5 1 小時以內 新手友好度 86/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
rubys/roundhouse#571 ·
維護者通常 1 天內回覆
-
area/web interface
難度 2/5 1-3 小時 新手友好度 78/100
mastodon/mastodon#40924 · 1 則留言 ·
維護者通常 1 天內回覆