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

Fix: associate event with transaction when thrown exception is not a direct cause #1463

Merged
merged 6 commits into from
May 10, 2021

Conversation

maciejwalkowiak
Copy link
Contributor

📜 Description

Fix: associate event with transaction when thrown exception is not a direct cause

💡 Motivation and Context

Fixes #1418

💚 How did you test it?

Unit tests.

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

@codecov-commenter
Copy link

Codecov Report

Merging #1463 (8d873b6) into main (d89dce1) will decrease coverage by 0.00%.
The diff coverage is 75.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1463      +/-   ##
============================================
- Coverage     75.83%   75.83%   -0.01%     
- Complexity     1901     1903       +2     
============================================
  Files           189      190       +1     
  Lines          6502     6509       +7     
  Branches        640      641       +1     
============================================
+ Hits           4931     4936       +5     
- Misses         1275     1276       +1     
- Partials        296      297       +1     
Impacted Files Coverage Δ Complexity Δ
...y/src/main/java/io/sentry/util/ExceptionUtils.java 66.66% <66.66%> (ø) 2.00 <2.00> (?)
sentry/src/main/java/io/sentry/Hub.java 74.43% <100.00%> (+0.07%) 77.00 <0.00> (ø)

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 d89dce1...8d873b6. Read the comment docs.

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

We need to make sure setThrowable now uses the reference of the rootCause instead of the one taken by parameter.

Other than that LGTM

sentry/src/test/java/io/sentry/HubTest.kt Show resolved Hide resolved
@maciejwalkowiak
Copy link
Contributor Author

I thought it through over the weekend and realised the missing scenario. Please take a look @marandaneto

Copy link
Contributor

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

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

LGTM

@maciejwalkowiak maciejwalkowiak merged commit 6a7e4bc into main May 10, 2021
@maciejwalkowiak maciejwalkowiak deleted the gh-1418 branch May 10, 2021 12:28
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.

Event is not associated with transaction when thrown exception is not a direct cause
4 participants