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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Set current thread only if theres no exceptions #1064

Merged
merged 4 commits into from
Nov 24, 2020
Merged

Conversation

marandaneto
Copy link
Contributor

@marandaneto marandaneto commented Nov 24, 2020

馃摙 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

馃摐 Description

Fix: Set current thread only if theres no exceptions

馃挕 Motivation and Context

We'd like to set the default (current) thread if attachStacktrace is enabled and there are no exceptions only, exceptions have its own stack traces already.
one of the use cases for this is events captured by hybrid SDKs like React-native or Flutter, the current thread will be always the File observer, and it doesn't make much sense.

馃挌 How did you test it?

馃摑 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing
  • No breaking changes

馃敭 Next steps

@marandaneto marandaneto changed the title fix/no threads Fix: Set current thread only if theres no exceptions Nov 24, 2020
@marandaneto
Copy link
Contributor Author

This also helps with #984

Copy link
Contributor

@maciejwalkowiak maciejwalkowiak left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-io
Copy link

codecov-io commented Nov 24, 2020

Codecov Report

Merging #1064 (f05d1eb) into main (e33333b) will increase coverage by 0.00%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #1064   +/-   ##
=========================================
  Coverage     72.95%   72.96%           
- Complexity     1520     1523    +3     
=========================================
  Files           161      161           
  Lines          5461     5463    +2     
  Branches        550      551    +1     
=========================================
+ Hits           3984     3986    +2     
  Misses         1187     1187           
  Partials        290      290           
Impacted Files Coverage 螖 Complexity 螖
...ry/src/main/java/io/sentry/MainEventProcessor.java 77.35% <81.81%> (+0.88%) 18.00 <1.00> (+3.00)
...y/src/main/java/io/sentry/SentryThreadFactory.java 97.14% <100.00%> (酶) 13.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 e33333b...f05d1eb. 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.

Thanks!

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.

None yet

4 participants