getsentry / sentry-ruby

Sentry SDK for Ruby
https://sentry.io/for/ruby
MIT License
933 stars 494 forks source link

Only instantiate SessionFlusher when the SDK is enabled under the current env #2245

Closed st0012 closed 9 months ago

st0012 commented 9 months ago

This method aims to encapsulate the conditions we need to consider for enabling session tracking. Currently, it includes:

Closes #2234

codecov[bot] commented 9 months ago

Codecov Report

Merging #2245 (1aaaa60) into master (2979e86) will increase coverage by 30.97%. The diff coverage is 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2245 +/- ## =========================================== + Coverage 66.46% 97.43% +30.97% =========================================== Files 101 102 +1 Lines 3793 3825 +32 =========================================== + Hits 2521 3727 +1206 + Misses 1272 98 -1174 ``` | [Components](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2245/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | Coverage Δ | | |---|---|---| | [sentry-ruby](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2245/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `98.14% <100.00%> (+42.53%)` | :arrow_up: | | [sentry-rails](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2245/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `95.05% <ø> (ø)` | | | [sentry-sidekiq](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2245/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `94.70% <ø> (ø)` | | | [sentry-resque](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2245/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `92.06% <ø> (-1.59%)` | :arrow_down: | | [sentry-delayed_job](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2245/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `95.60% <ø> (ø)` | | | [sentry-opentelemetry](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2245/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `100.00% <ø> (ø)` | | | [Files](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2245?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | Coverage Δ | | |---|---|---| | [sentry-ruby/lib/sentry-ruby.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2245?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS1ydWJ5LnJi) | `96.44% <100.00%> (+32.48%)` | :arrow_up: | | [sentry-ruby/lib/sentry/configuration.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2245?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS9jb25maWd1cmF0aW9uLnJi) | `98.79% <100.00%> (+19.52%)` | :arrow_up: | ... and [53 files with indirect coverage changes](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2245/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry)