getsentry / getsentry/sentry-ruby

Cleanup initialize/close behavior to prevent initialized? checks everywhere

オープン
#2,096 コメント 1 件 リアクション 0 件 担当者 1 名 @st0012 に割り当て済み GitHub で見る
Refactoring Ruby Task
主要言語
Ruby
スター
987
フォーク
541
平均マージ
17時間 40分
マージ済み PR(30日)
19

説明

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_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。