getsentry / getsentry/sentry-ruby

Add ability to capture variables from all frames

Đang mở
#2,002 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
Errors Feature Ruby
Ngôn ngữ chính
Ruby
Star
987
Fork
541
Merge trung bình
17 giờ 40 phút
Pull request đã merge (30 ngày)
19

Mô tả

**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](https://github.com/getsentry/sentry-ruby/blob/a7bc13ed200756aea00a3ed8a3e0abe0715e6ab9/sentry-ruby/lib/sentry-ruby.rb#L57-L58) 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.