Skip to content

Add SentryRequest context for HttpException and SocketException#1118

Merged
marandaneto merged 19 commits into
getsentry:mainfrom
ueman:improve-exceptions
Nov 17, 2022
Merged

Add SentryRequest context for HttpException and SocketException#1118
marandaneto merged 19 commits into
getsentry:mainfrom
ueman:improve-exceptions

Conversation

@ueman

@ueman ueman commented Nov 9, 2022

Copy link
Copy Markdown
Collaborator

📜 Description

Add SentryRequest context for HttpException and SocketException.
Also SocketException and FileSystemException have an underlying OSError, which is now reported as underlying exception.

I've also done some small refactoring of moving the enricher event processors into the event processor folder. I've also added a new constructor to SentryRequest and removed duplicated code.

💡 Motivation and Context

HttpExceptions and SocketException can now be filtered via the request context.

💚 How did you test it?

Added new tests.

📝 Checklist

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

🔮 Next steps

Comment thread CHANGELOG.md Outdated
@codecov-commenter

codecov-commenter commented Nov 9, 2022

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.16393% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.95%. Comparing base (a49594a) to head (62eb116).
⚠️ Report is 1310 commits behind head on main.

Files with missing lines Patch % Lines
...cessor/exception/io_exception_event_processor.dart 86.36% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1118      +/-   ##
==========================================
- Coverage   90.09%   89.95%   -0.14%     
==========================================
  Files         117      110       -7     
  Lines        3605     3456     -149     
==========================================
- Hits         3248     3109     -139     
+ Misses        357      347      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread dart/lib/src/event_processor/exception/io_exception_event_processor.dart Outdated
Comment thread dart/lib/src/event_processor/exception/io_exception_event_processor.dart Outdated
Comment thread dart/lib/src/event_processor/exception/io_exception_event_processor.dart Outdated
Comment thread dart/lib/src/protocol/sentry_request.dart

@marandaneto marandaneto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @ueman

@ueman

ueman commented Nov 17, 2022

Copy link
Copy Markdown
Collaborator Author

The failures come again because of the newly introduced SentryRequest.fromUri constructor which the dio and flutter libraries don't know when pana runs :(

@marandaneto

Copy link
Copy Markdown
Contributor

The failures come again because of the newly introduced SentryRequest.fromUri constructor which the dio and flutter libraries don't know when pana runs :(

yeah, it's pana, after publishing it, it will be green.

@marandaneto
marandaneto merged commit f4cc744 into getsentry:main Nov 17, 2022
@ueman
ueman deleted the improve-exceptions branch November 17, 2022 20:26
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.

4 participants