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

Add support for sqflite #1306

Merged
merged 48 commits into from
Mar 20, 2023
Merged

Add support for sqflite #1306

merged 48 commits into from
Mar 20, 2023

Conversation

marandaneto
Copy link
Contributor

@marandaneto marandaneto commented Mar 2, 2023

📜 Description

Add support for sqflite

💡 Motivation and Context

Closes #1201

💚 How did you test it?

📝 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

@codecov
Copy link

codecov bot commented Mar 2, 2023

Codecov Report

Patch coverage: 84.13% and project coverage change: -0.33 ⚠️

Comparison is base (934b4d9) 90.29% compared to head (73cc5f9) 89.97%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1306      +/-   ##
==========================================
- Coverage   90.29%   89.97%   -0.33%     
==========================================
  Files         170      176       +6     
  Lines        5274     5564     +290     
==========================================
+ Hits         4762     5006     +244     
- Misses        512      558      +46     
Impacted Files Coverage Δ
sqflite/lib/src/sentry_sqflite_transaction.dart 17.85% <17.85%> (ø)
...flite/lib/src/sentry_sqflite_database_factory.dart 73.68% <73.68%> (ø)
sqflite/lib/src/sentry_database.dart 77.50% <77.50%> (ø)
sqflite/lib/src/sentry_sqflite.dart 81.25% <81.25%> (ø)
sqflite/lib/src/sentry_batch.dart 94.73% <94.73%> (ø)
sqflite/lib/src/sentry_database_executor.dart 97.61% <97.61%> (ø)
dart/lib/src/protocol/sdk_version.dart 100.00% <100.00%> (ø)
dio/lib/src/sentry_dio_extension.dart 94.73% <100.00%> (+0.29%) ⬆️
file/lib/src/sentry_file.dart 54.47% <100.00%> (+0.34%) ⬆️

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@marandaneto
Copy link
Contributor Author

@ueman @kuhnroyal what do you think about this wrapper approach in case you'd be using sqflite?

@ueman
Copy link
Collaborator

ueman commented Mar 2, 2023

I'm not using sqflite but the approach looks reasonable to me (The app I'm working on sadly uses Hive for our offline storage needs)

@marandaneto marandaneto requested a review from romtsn March 8, 2023 12:56
Base automatically changed from v7.0.0 to main March 15, 2023 12:41
@github-actions
Copy link
Contributor

github-actions bot commented Mar 15, 2023

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 320.79 ms 369.78 ms 48.98 ms
Size 6.06 MiB 7.03 MiB 989.25 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
a49594a 282.27 ms 344.84 ms 62.57 ms
e893df5 310.60 ms 380.58 ms 69.98 ms
5603ab2 309.84 ms 345.20 ms 35.36 ms
a094100 388.02 ms 459.50 ms 71.48 ms
333903e 332.76 ms 406.86 ms 74.10 ms
1131914 317.90 ms 361.58 ms 43.69 ms
11fb408 320.10 ms 380.24 ms 60.14 ms
9f9f94f 331.04 ms 368.92 ms 37.88 ms
abcdba3 354.68 ms 399.04 ms 44.36 ms
dd1f7d2 338.54 ms 387.10 ms 48.56 ms

App size

Revision Plain With Sentry Diff
a49594a 5.94 MiB 6.95 MiB 1.01 MiB
e893df5 6.06 MiB 7.09 MiB 1.03 MiB
5603ab2 5.94 MiB 6.95 MiB 1.01 MiB
a094100 5.94 MiB 6.96 MiB 1.02 MiB
333903e 6.06 MiB 7.10 MiB 1.04 MiB
1131914 5.94 MiB 6.96 MiB 1.02 MiB
11fb408 6.06 MiB 7.10 MiB 1.04 MiB
9f9f94f 5.94 MiB 6.95 MiB 1.01 MiB
abcdba3 5.94 MiB 6.95 MiB 1.01 MiB
dd1f7d2 6.06 MiB 7.10 MiB 1.04 MiB

Previous results on branch: chore/sqflite

Startup times

Revision Plain With Sentry Diff
56468d2 474.51 ms 574.44 ms 99.93 ms
bd9aaf6 352.86 ms 392.50 ms 39.64 ms
4ba8dd1 432.81 ms 530.86 ms 98.04 ms
232f68e 345.67 ms 390.18 ms 44.51 ms
b389605 321.65 ms 422.27 ms 100.62 ms
c6a2a62 542.73 ms 660.24 ms 117.51 ms
f574c43 332.02 ms 391.24 ms 59.22 ms
a949bae 301.29 ms 357.28 ms 55.99 ms
78de98b 308.56 ms 360.40 ms 51.84 ms
2e880ff 307.00 ms 370.47 ms 63.47 ms

App size

Revision Plain With Sentry Diff
56468d2 6.06 MiB 7.10 MiB 1.04 MiB
bd9aaf6 6.06 MiB 7.10 MiB 1.04 MiB
4ba8dd1 6.06 MiB 7.10 MiB 1.04 MiB
232f68e 6.06 MiB 7.10 MiB 1.04 MiB
b389605 6.06 MiB 7.10 MiB 1.04 MiB
c6a2a62 6.06 MiB 7.03 MiB 989.24 KiB
f574c43 6.06 MiB 7.10 MiB 1.04 MiB
a949bae 6.06 MiB 7.10 MiB 1.04 MiB
78de98b 6.06 MiB 7.10 MiB 1.04 MiB
2e880ff 6.06 MiB 7.10 MiB 1.04 MiB

@github-actions
Copy link
Contributor

github-actions bot commented Mar 15, 2023

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1256.24 ms 1266.88 ms 10.63 ms
Size 8.10 MiB 9.16 MiB 1.07 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
453e1bc 1294.78 ms 1308.10 ms 13.33 ms
a49594a 1284.83 ms 1313.29 ms 28.45 ms
6e083bb 1244.33 ms 1264.60 ms 20.26 ms
a094100 1260.27 ms 1276.75 ms 16.48 ms
21d4150 1252.86 ms 1280.55 ms 27.69 ms
c70e01a 1273.00 ms 1299.12 ms 26.12 ms
873fb42 1261.00 ms 1285.92 ms 24.92 ms
49a149b 1296.47 ms 1320.20 ms 23.73 ms
08a7b4f 1277.10 ms 1303.37 ms 26.27 ms
dd1f7d2 1263.16 ms 1275.15 ms 11.99 ms

App size

Revision Plain With Sentry Diff
453e1bc 8.16 MiB 9.16 MiB 1.00 MiB
a49594a 8.16 MiB 9.16 MiB 1.00 MiB
6e083bb 8.16 MiB 9.17 MiB 1.01 MiB
a094100 8.16 MiB 9.17 MiB 1.01 MiB
21d4150 8.16 MiB 9.17 MiB 1.01 MiB
c70e01a 8.16 MiB 9.17 MiB 1.01 MiB
873fb42 8.16 MiB 9.17 MiB 1.01 MiB
49a149b 8.15 MiB 9.12 MiB 986.26 KiB
08a7b4f 8.16 MiB 9.16 MiB 1.01 MiB
dd1f7d2 8.10 MiB 9.16 MiB 1.07 MiB

Previous results on branch: chore/sqflite

Startup times

Revision Plain With Sentry Diff
f574c43 1296.84 ms 1321.59 ms 24.76 ms
78de98b 1236.56 ms 1255.27 ms 18.70 ms
a949bae 1269.10 ms 1293.57 ms 24.47 ms
232f68e 1268.44 ms 1280.04 ms 11.60 ms
2e880ff 1261.73 ms 1282.84 ms 21.10 ms
b389605 1258.41 ms 1283.06 ms 24.65 ms
6fbe91b 1261.73 ms 1268.39 ms 6.65 ms
bd9aaf6 1269.98 ms 1279.65 ms 9.67 ms
c6a2a62 1265.78 ms 1271.80 ms 6.02 ms
aec5fd1 1261.71 ms 1275.92 ms 14.21 ms

App size

Revision Plain With Sentry Diff
f574c43 8.10 MiB 9.14 MiB 1.05 MiB
78de98b 8.10 MiB 9.16 MiB 1.06 MiB
a949bae 8.10 MiB 9.14 MiB 1.05 MiB
232f68e 8.10 MiB 9.16 MiB 1.07 MiB
2e880ff 8.10 MiB 9.14 MiB 1.04 MiB
b389605 8.10 MiB 9.14 MiB 1.05 MiB
6fbe91b 8.10 MiB 9.16 MiB 1.07 MiB
bd9aaf6 8.10 MiB 9.14 MiB 1.05 MiB
c6a2a62 8.10 MiB 9.16 MiB 1.07 MiB
aec5fd1 8.10 MiB 9.14 MiB 1.05 MiB

@marandaneto marandaneto marked this pull request as ready for review March 16, 2023 10:03
@marandaneto
Copy link
Contributor Author

@krystofwoldrich @brustolin ready for final review

Copy link
Member

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

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

sentry-flutter / analyze failed on an unrelated file?

sentry-sqflite / analyze / package-analysis will work after publishing the package, right?

I have some small comments/questions but besides that, all looks good. 🚀

flutter/example/lib/main.dart Outdated Show resolved Hide resolved
flutter/example/lib/main.dart Show resolved Hide resolved
@marandaneto
Copy link
Contributor Author

sentry-flutter / analyze failed on an unrelated file?

sentry-sqflite / analyze / package-analysis will work after publishing the package, right?

I have some small comments/questions but besides that, all looks good. 🚀

Both correct, fixed.

@marandaneto marandaneto merged commit 40680d3 into main Mar 20, 2023
@marandaneto marandaneto deleted the chore/sqflite branch March 20, 2023 13:41
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.

APM/crumbs support for sqflite
5 participants