getsentry / sentry-ruby

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

Fix issues with stopping Vernier #2429

Closed solnic closed 1 month ago

solnic commented 1 month ago

This ensures that we rely on status returned from Vernier.start_profile when setting profiler's @started value and also now Sentry::Vernier::Profiler#stop will fail gracefully when for whatever reason stopping crashed.

Fixes #2425

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.67%. Comparing base (499cbac) to head (760804d). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2429 +/- ## ======================================= Coverage 98.67% 98.67% ======================================= Files 220 220 Lines 14450 14462 +12 ======================================= + Hits 14258 14270 +12 Misses 192 192 ``` | [Components](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2429/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/2429/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `99.01% <100.00%> (-0.01%)` | :arrow_down: | | [sentry-rails](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2429/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `97.34% <ø> (ø)` | | | [sentry-sidekiq](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2429/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `97.07% <ø> (ø)` | | | [sentry-resque](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2429/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `97.11% <ø> (+0.32%)` | :arrow_up: | | [sentry-delayed_job](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2429/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `98.92% <ø> (ø)` | | | [sentry-opentelemetry](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2429/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry) | `100.00% <ø> (ø)` | | | [Files with missing lines](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2429?dropdown=coverage&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/vernier/profiler.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2429?src=pr&el=tree&filepath=sentry-ruby%2Flib%2Fsentry%2Fvernier%2Fprofiler.rb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1YnkvbGliL3NlbnRyeS92ZXJuaWVyL3Byb2ZpbGVyLnJi) | `100.00% <100.00%> (ø)` | | | [sentry-ruby/spec/sentry/vernier/profiler\_spec.rb](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2429?src=pr&el=tree&filepath=sentry-ruby%2Fspec%2Fsentry%2Fvernier%2Fprofiler_spec.rb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry#diff-c2VudHJ5LXJ1Ynkvc3BlYy9zZW50cnkvdmVybmllci9wcm9maWxlcl9zcGVjLnJi) | `100.00% <100.00%> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/getsentry/sentry-ruby/pull/2429/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=getsentry)