Mark transaction as internal_error in case of unhandled errors#1218
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v7.0.0 #1218 +/- ##
=========================================
Coverage ? 89.76%
=========================================
Files ? 111
Lines ? 3489
Branches ? 0
=========================================
Hits ? 3132
Misses ? 357
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
marandaneto
commented
Jan 11, 2023
|
|
||
| ## 7.0.0-alpha.1 | ||
|
|
||
| ### Various fixes & improvements |
Contributor
Author
There was a problem hiding this comment.
Just fixing the changelog.
marandaneto
commented
Jan 11, 2023
| ); | ||
| } | ||
| /// Parse and raise an event out of the Isolate error. | ||
| @visibleForTesting |
Contributor
Author
There was a problem hiding this comment.
Just moved from a standalone function to inside of the class.
marandaneto
commented
Jan 11, 2023
Comment on lines
+70
to
+74
| // marks the span status if none to `internal_error` in case there's an | ||
| // unhandled error | ||
| hub.configureScope((scope) => { | ||
| scope.span?.status ??= const SpanStatus.internalError(), | ||
| }); |
Contributor
Author
There was a problem hiding this comment.
That's the added code.
marandaneto
commented
Jan 11, 2023
| /// Needed to check if we somehow caused a `print()` recursion | ||
| bool _isPrinting = false; | ||
|
|
||
| @visibleForTesting |
Contributor
Author
There was a problem hiding this comment.
Just moved to the class, to be tested.
marandaneto
commented
Jan 11, 2023
Comment on lines
+50
to
+54
| // marks the span status if none to `internal_error` in case there's an | ||
| // unhandled error | ||
| hub.configureScope((scope) => { | ||
| scope.span?.status ??= const SpanStatus.internalError(), | ||
| }); |
marandaneto
commented
Jan 11, 2023
|
|
||
| void main() { | ||
| TestWidgetsFlutterBinding.ensureInitialized(); | ||
| group(OnErrorIntegration, () { |
Contributor
Author
There was a problem hiding this comment.
Just moved within the group
marandaneto
commented
Jan 11, 2023
| final throwableMechanism = event.throwableMechanism as ThrowableMechanism; | ||
| expect(throwableMechanism.mechanism.handled, true); | ||
| }); | ||
| test('marks transaction as internal error if no status', () async { |
marandaneto
marked this pull request as ready for review
January 11, 2023 14:10
marandaneto
requested review from
brustolin and
krystofwoldrich
as code owners
January 11, 2023 14:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
💡 Motivation and Context
Closes #1182
💚 How did you test it?
📝 Checklist
🔮 Next steps