Add ability to capture variables from all frames

未關閉
#2,002 0 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 2 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
25/100
Issue 類型
功能
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
ruby
領域
observability

研究方向

從 lib/sentry-ruby.rb 的第 57-58 行開始,issue 中指出 TracePoint 會取得區域變數的 binding。確認 Ruby 是否能從 Exception Handler 存取每個 frame 的 binding,接著找出現有的 include_local_variables 測試。完成標準是:opt-in 報告包含所有 stack frame 中的變數,同時不改變目前的行為。

由索引模型根據 Issue 內容生成。

描述

Errors Feature Ruby

Describe the idea
I am currently using the include_local_variables flag to capture the top frame's variables on an exception. AFAIK there isn't support for capturing variables for all frames, only the top frame. I am curious if it is possible to report variables for all frames in the stack as an option as well.

Why do you think it's beneficial to most of the users

In my case, it would help a ton to debug why an error is occurring to understand how to solve it. For example, there is an exception being raised by an HTTP request, but the part I am trying to understand is how that request was constructed, not why the exception was raised when executing that request (the wrong request is being sent).

Screenshot 2023-02-13 at 6 15 27 PM

Possible implementation

I am not sure if this is possible in Ruby!

I see the current implementation gets the binding using TracePoint, and then gets the variables from that.

I don't know in ruby if you can navigate up the stack in an exception handler like this.

主要語言
Ruby
星號
990
分支
552
平均合併
2 天 16 小時
30 天內合併 PR
29

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

getsentry/sentry-ruby 的其他 Issue

查看 getsentry/sentry-ruby 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。