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

Add mechanism interface and default to handled false in integrations #2280

Merged
merged 2 commits into from Apr 3, 2024

Conversation

sl0thentr0py
Copy link
Member

closes #1743

Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Merging #2280 (9130bcc) into master (ffffce9) will decrease coverage by 0.04%.
Report is 1 commits behind head on master.
The diff coverage is 96.29%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2280      +/-   ##
==========================================
- Coverage   97.61%   97.57%   -0.04%     
==========================================
  Files         112      113       +1     
  Lines        4154     4170      +16     
==========================================
+ Hits         4055     4069      +14     
- Misses         99      101       +2     
Components Coverage Δ
sentry-ruby 98.24% <96.29%> (-0.06%) ⬇️
sentry-rails 95.22% <ø> (ø)
sentry-sidekiq 94.70% <ø> (ø)
sentry-resque 90.76% <ø> (ø)
sentry-delayed_job 95.60% <ø> (ø)
sentry-opentelemetry 100.00% <ø> (ø)
Files Coverage Δ
sentry-ruby/lib/sentry/client.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/error_event.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/integrable.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/interface.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/interfaces/exception.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/interfaces/mechanism.rb 100.00% <100.00%> (ø)
...try-ruby/lib/sentry/interfaces/single_exception.rb 100.00% <100.00%> (ø)
sentry-ruby/lib/sentry/rack/capture_exceptions.rb 95.55% <100.00%> (+0.31%) ⬆️
sentry-ruby/lib/sentry/rake.rb 60.00% <0.00%> (-4.29%) ⬇️

... and 1 file with indirect coverage changes

@sl0thentr0py sl0thentr0py force-pushed the neel/mechanism branch 2 times, most recently from 776afb7 to 6b3bee0 Compare March 27, 2024 14:24
@sl0thentr0py sl0thentr0py marked this pull request as ready for review March 27, 2024 14:25
@@ -29,17 +29,19 @@ def initialize(exception:, stacktrace: nil)
@module = exception.class.to_s.split('::')[0...-1].join('::')
@thread_id = Thread.current.object_id
@stacktrace = stacktrace
@mechanism = mechanism || Mechanism.new
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this default assignment upstream? I think if we assign a default in Hub#capture_exception as well, then we can just assume mechanism will always be present when it reached client and interfaces?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it to Client#event_from_exception since we'll have to break the signature of that method otherwise since it uses positional and not keyword arguments.

Copy link
Collaborator

@st0012 st0012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment left, otherwise it's good.

sentry-ruby/lib/sentry/client.rb Outdated Show resolved Hide resolved
Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rubber stamp

@sl0thentr0py sl0thentr0py merged commit 4d8fa6e into master Apr 3, 2024
122 of 124 checks passed
@sl0thentr0py sl0thentr0py deleted the neel/mechanism branch April 3, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add mechanism to the exception interfaces
3 participants