Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log errors happened in BackgroundWorker#perform #1624

Merged
merged 3 commits into from
Nov 22, 2021
Merged

Log errors happened in BackgroundWorker#perform #1624

merged 3 commits into from
Nov 22, 2021

Conversation

st0012
Copy link
Collaborator

@st0012 st0012 commented Nov 20, 2021

I assumed the block passed to BackgroundWorker#perform should already handle exceptions (e.g. Client#send_event). But #1618 showed it's not entirely true. So this PR adds exception logging to background worker and provide a safer approach to monkey patch its method.

Closes #1618

@st0012 st0012 added this to the 4.8.1 milestone Nov 20, 2021
@st0012 st0012 self-assigned this Nov 20, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2021

Codecov Report

Merging #1624 (5515876) into master (1f96dce) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1624      +/-   ##
==========================================
- Coverage   98.50%   98.49%   -0.02%     
==========================================
  Files         133      133              
  Lines        7382     7394      +12     
==========================================
+ Hits         7272     7283      +11     
- Misses        110      111       +1     
Impacted Files Coverage Δ
sentry-rails/lib/sentry/rails/background_worker.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/background_worker.rb 100.00% <100.00%> (ø)
sentry-ruby/spec/sentry/background_worker_spec.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/breadcrumb.rb 95.65% <0.00%> (-4.35%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f96dce...5515876. Read the comment docs.

@st0012 st0012 merged commit bf37772 into master Nov 22, 2021
@st0012 st0012 deleted the fix-#1618 branch November 22, 2021 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Background worker send fails if ActiveRecord defined but not correctly configured
3 participants