-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Update sentry_dio
to dio 5
#1282
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## v7.0.0 #1282 +/- ##
=======================================
Coverage 90.53% 90.53%
=======================================
Files 50 50
Lines 1649 1649
=======================================
Hits 1493 1493
Misses 156 156
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. |
Thanks, it looks good, but CI is not happy yet. :) |
There are a few things missing. |
I'll look at it later.
What did I miss? |
Nah all good, sorry. I was still working on the 6.x branch. |
Would be great if we can get this in a new 7.0.0 beta asap. |
I'm on it 🚀 |
expect(e.message, 'Exception: test'); | ||
expect(e.error.toString(), 'Exception: test'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is due to changes in dio
@@ -75,7 +75,6 @@ void main() { | |||
expect(processedEvent.request?.queryString, 'foo=bar'); | |||
expect(processedEvent.request?.headers, <String, String>{ | |||
'foo': 'bar', | |||
'content-type': 'application/json; charset=utf-8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dio doesn't apply a content-type by itself anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Is there something left to do before it can be merged? |
@ueman I think it's ready, just let's update the changelog to show this as a breaking change. |
Would love to get a beta release with this :) |
The pipeline still has one failing job, but it's for the pure Dart SDK. Since that's not touch in this PR, I'm wondering whether that's just a flake. Can someone rerun the jobs? Edit: Apparently, that job is failing for all PRs which target the v7 branch, so it's unrelated to this PR. |
We have to upgrade |
I will look into this tomorrow, sorry about the delay, just came back from vacation and catching up with all the pending things. |
No worries, thanks for looking into it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this @ueman
Mind appending the migration page? |
Sure. Is there anything in particular you'd like to see? Edit: It's here getsentry/sentry-docs#6400 |
I have tested this change excessively over the last few days and the whole update from Sentry 6.x/Dio 4.x to Sentry 7.0/Dio 5.0 is a big step back regarding traceability of the I think the Something like: class DioErrorExtractor extends ExceptionCauseExtractor<DioError> {
@override
ExceptionCause? cause(DioError error) {
if (error.error == null) {
return null;
}
return ExceptionCause(
error.error,
error.error is Error ? (error.error as Error).stackTrace : null,
);
}
} |
📜 Description
Dio changed in ownership to the guys behind diox, which previously was forked from dio.
Since the ownership changed, they've published diox v5 also as dio v5.
This PR makes the necessary changes to be compatible.
💡 Motivation and Context
Compatibility with dio v5
💚 How did you test it?
Tests
📝 Checklist
sendDefaultPii
is enabled🔮 Next steps