getsentry / getsentry/sentry-ruby

Cleanup initialize/close behavior to prevent initialized? checks everywhere

Đang mở
#2,096 1 bình luận 0 reaction 1 người được giao Được giao cho @st0012 Xem trên GitHub
Refactoring Ruby Task
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ả

And perhaps we should implement a better version of `close` and `Sentry.initialize?` 🤔

Specifically:

- We don't erase hub variables, `@background_worker` and `@session_flusher`
- `Sentry.initialize?` is backed by a simple boolean state that's changed by `Sentry.ini` and `Sentry.close`.

We would still need `Sentry.initialize?` in some places to stop some actions after the SDK is closed, but we don't need it for preventing`nil` value anymore, which is getting out of hand IMO.

_Originally posted by @st0012 in https://github.com/getsentry/sentry-ruby/pull/2084#discussion_r1308034537_

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.