-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
feat: capture Response context in HTTP Client #1095
Conversation
|
Android Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
559d28f | 302.35 ms | 339.53 ms | 37.18 ms |
56810ff | 309.72 ms | 352.26 ms | 42.54 ms |
3e5ee37 | 317.56 ms | 366.84 ms | 49.28 ms |
1c6eb5b | 350.69 ms | 393.86 ms | 43.17 ms |
4efee31 | 308.92 ms | 368.68 ms | 59.76 ms |
f922f8f | 332.31 ms | 374.67 ms | 42.37 ms |
613760b | 373.42 ms | 399.33 ms | 25.92 ms |
870f5eb | 329.45 ms | 369.29 ms | 39.84 ms |
d7758e8 | 300.12 ms | 349.88 ms | 49.76 ms |
322aa66 | 284.98 ms | 341.76 ms | 56.78 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
559d28f | 5.94 MiB | 6.92 MiB | 1001.70 KiB |
56810ff | 5.94 MiB | 6.92 MiB | 1001.71 KiB |
3e5ee37 | 5.94 MiB | 6.92 MiB | 1001.19 KiB |
1c6eb5b | 5.94 MiB | 6.92 MiB | 1001.53 KiB |
4efee31 | 5.94 MiB | 6.92 MiB | 1003.76 KiB |
f922f8f | 5.94 MiB | 6.95 MiB | 1.01 MiB |
613760b | 5.94 MiB | 6.92 MiB | 1005.98 KiB |
870f5eb | 5.94 MiB | 6.92 MiB | 1005.77 KiB |
d7758e8 | 5.94 MiB | 6.95 MiB | 1.01 MiB |
322aa66 | 5.94 MiB | 6.92 MiB | 1005.75 KiB |
Previous results on branch: feat/http-response
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
110b200 | 318.88 ms | 353.78 ms | 34.90 ms |
8f551ef | 291.75 ms | 328.16 ms | 36.41 ms |
6cc09c5 | 326.86 ms | 379.84 ms | 52.98 ms |
383665d | 320.82 ms | 358.76 ms | 37.94 ms |
3cf0e6f | 386.28 ms | 465.84 ms | 79.56 ms |
d433b49 | 320.88 ms | 366.70 ms | 45.82 ms |
bf7a456 | 328.06 ms | 371.62 ms | 43.56 ms |
9274023 | 316.04 ms | 364.59 ms | 48.55 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
110b200 | 5.94 MiB | 6.95 MiB | 1.01 MiB |
8f551ef | 5.94 MiB | 6.95 MiB | 1.01 MiB |
6cc09c5 | 5.94 MiB | 6.95 MiB | 1.01 MiB |
383665d | 5.94 MiB | 6.95 MiB | 1.01 MiB |
3cf0e6f | 5.94 MiB | 6.95 MiB | 1.01 MiB |
d433b49 | 5.94 MiB | 6.95 MiB | 1.01 MiB |
bf7a456 | 5.94 MiB | 6.95 MiB | 1.01 MiB |
9274023 | 5.94 MiB | 6.95 MiB | 1.01 MiB |
iOS Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
72dfc83 | 1262.50 ms | 1289.75 ms | 27.25 ms |
9c5aec6 | 1266.51 ms | 1274.65 ms | 8.14 ms |
eb1a7c1 | 1281.25 ms | 1295.40 ms | 14.15 ms |
613760b | 1263.10 ms | 1277.27 ms | 14.16 ms |
559d28f | 1265.04 ms | 1288.96 ms | 23.92 ms |
6d317ea | 1277.27 ms | 1287.47 ms | 10.20 ms |
2f8f173 | 1280.61 ms | 1292.20 ms | 11.59 ms |
d7758e8 | 1271.69 ms | 1288.08 ms | 16.39 ms |
0ceb89c | 1252.02 ms | 1271.78 ms | 19.75 ms |
870f5eb | 1267.78 ms | 1286.86 ms | 19.08 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
72dfc83 | 8.15 MiB | 9.12 MiB | 987.30 KiB |
9c5aec6 | 8.15 MiB | 9.12 MiB | 986.23 KiB |
eb1a7c1 | 8.15 MiB | 9.13 MiB | 1000.10 KiB |
613760b | 8.15 MiB | 9.13 MiB | 1000.46 KiB |
559d28f | 8.15 MiB | 9.12 MiB | 987.32 KiB |
6d317ea | 8.15 MiB | 9.12 MiB | 986.26 KiB |
2f8f173 | 8.15 MiB | 9.13 MiB | 1000.39 KiB |
d7758e8 | 8.15 MiB | 9.12 MiB | 989.76 KiB |
0ceb89c | 8.15 MiB | 9.12 MiB | 989.78 KiB |
870f5eb | 8.15 MiB | 9.13 MiB | 1000.08 KiB |
Previous results on branch: feat/http-response
Startup times
Revision | Plain | With Sentry | Diff |
---|---|---|---|
8f551ef | 1277.45 ms | 1294.31 ms | 16.86 ms |
110b200 | 1272.82 ms | 1302.16 ms | 29.35 ms |
6cc09c5 | 1278.43 ms | 1304.77 ms | 26.34 ms |
fa59ae2 | 1283.29 ms | 1300.98 ms | 17.69 ms |
3cf0e6f | 1264.98 ms | 1297.61 ms | 32.63 ms |
9274023 | 1282.29 ms | 1308.67 ms | 26.39 ms |
d433b49 | 1267.06 ms | 1279.17 ms | 12.11 ms |
383665d | 1285.77 ms | 1299.59 ms | 13.82 ms |
bf7a456 | 1265.72 ms | 1294.96 ms | 29.23 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
8f551ef | 8.15 MiB | 9.12 MiB | 990.59 KiB |
110b200 | 8.15 MiB | 9.12 MiB | 990.57 KiB |
6cc09c5 | 8.15 MiB | 9.12 MiB | 989.10 KiB |
fa59ae2 | 8.15 MiB | 9.12 MiB | 990.59 KiB |
3cf0e6f | 8.15 MiB | 9.12 MiB | 990.61 KiB |
9274023 | 8.15 MiB | 9.12 MiB | 990.04 KiB |
d433b49 | 8.15 MiB | 9.12 MiB | 989.06 KiB |
383665d | 8.15 MiB | 9.12 MiB | 990.55 KiB |
bf7a456 | 8.15 MiB | 9.12 MiB | 990.61 KiB |
@@ -165,6 +167,7 @@ class FailedRequestClient extends BaseClient { | |||
url: urlWithoutQuery, | |||
queryString: query, | |||
cookies: sendDefaultPii ? request.headers['Cookie'] : null, | |||
// TODO FIXME - this should check [sendDefaultPii], same as DIO integration. |
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.
No need, the default here is MaxRequestBodySize.never
So if the user has set something else, this is opt-in for whatever the data is, even if PII.
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.
OK, according to that logic, the following should be removed too? https://github.com/getsentry/sentry-dart/blob/main/dio/lib/src/dio_event_processor.dart#L143
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.
Mmm good catch, I've missed that, I guess its an oversight on the Dio integration them.
https://docs.sentry.io/platforms/php/configuration/options/#max-request-body-size
Does not mention thesendDefaultPii
flag , let's keep this TODO here and I will double-check internally.
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.
actually, with the following comment that I should remove body
and replace it with bodySize
, it's OK anyway, since body size itself is not PII.
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.
Yep but body
still lives in the Request
, it's not only there in the Response
.
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.
Let's add the sendDefaultPii
check here for the body
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.
ok, added the check
d433b49
to
6cc09c5
Compare
Codecov ReportBase: 89.98% // Head: 90.14% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1095 +/- ##
==========================================
+ Coverage 89.98% 90.14% +0.16%
==========================================
Files 115 116 +1
Lines 3585 3573 -12
==========================================
- Hits 3226 3221 -5
+ Misses 359 352 -7
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. |
fa59ae2
to
3cf0e6f
Compare
…re setting, same as the DIO integration
@vaind there are some linters: error - test/mocks/mock_transport.dart:45:11 - Missing variable type for 'envelopeItemJson'. Try adding an explicit type, or remove implicit-dynamic from your analysis options file. - implicit_dynamic_variable |
Fixed now. BTW any reason why do the various packages use different linter rules? |
bf7a456
to
d0ac2c5
Compare
nope, either an oversight or because it's a dep depending on other dep, and other packages, might differ a bit, but in general, they should be very similar if not the same. |
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 @vaind
📜 Description
💡 Motivation and Context
closes #969
💚 How did you test it?
📝 Checklist
🔮 Next steps