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 from PlatformDispatcher #1257

Merged
merged 4 commits into from
Jan 31, 2023

Conversation

maBarabas
Copy link
Contributor

📜 Description

This is similar to how the FlutterErrorIntegration prints caught errors.

💡 Motivation and Context

Fixes #1255

💚 How did you test it?

See demo app at linked issue. After this change, enabling debug on Sentry options makes an error show up in the logs for each error reported by the PlatformDispatcher.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

This is similar to how the FlutterErrorIntegration prints caught errors.
@marandaneto
Copy link
Contributor

Thanks @maBarabas

@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Base: 90.03% // Head: 90.65% // Increases project coverage by +0.61% 🎉

Coverage data is based on head (0d9dba7) compared to base (8fa3934).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 0d9dba7 differs from pull request most recent head e6e09e8. Consider uploading reports for the commit e6e09e8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1257      +/-   ##
==========================================
+ Coverage   90.03%   90.65%   +0.61%     
==========================================
  Files         110      144      +34     
  Lines        3483     4707    +1224     
==========================================
+ Hits         3136     4267    +1131     
- Misses        347      440      +93     
Impacted Files Coverage Δ
...ter/lib/src/integrations/on_error_integration.dart 93.93% <100.00%> (ø)
...ib/src/integrations/flutter_error_integration.dart 100.00% <0.00%> (ø)
...src/integrations/native_app_start_integration.dart 77.77% <0.00%> (ø)
...nt_processor/flutter_enricher_event_processor.dart 92.85% <0.00%> (ø)
...nt_processor/native_app_start_event_processor.dart 93.33% <0.00%> (ø)
flutter/lib/src/sentry_flutter_options.dart 73.33% <0.00%> (ø)
...er_interaction/sentry_user_interaction_widget.dart 96.46% <0.00%> (ø)
flutter/lib/src/sentry_native.dart 100.00% <0.00%> (ø)
flutter/lib/src/sentry_asset_bundle.dart 93.02% <0.00%> (ø)
.../src/integrations/load_image_list_integration.dart 96.00% <0.00%> (ø)
... and 25 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@marandaneto marandaneto marked this pull request as ready for review January 31, 2023 13:12
@marandaneto marandaneto enabled auto-merge (squash) January 31, 2023 13:28
@maBarabas
Copy link
Contributor Author

Should we log at debug level even when handled is true? Right now even handled errors are logged as a sentry error.

@marandaneto marandaneto merged commit c1bb00f into getsentry:main Jan 31, 2023
@marandaneto
Copy link
Contributor

Should we log at debug level even when handled is true? Right now even handled errors are logged as a sentry error.

That's just for console logging, it is fine as it is, and we can change it if necessary.

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.

Sentry swallows console logs caused by throwing async callbacks called by Flutter
2 participants