RevenueCat / purchases-android

Android in-app purchases and subscriptions made easy.
https://www.revenuecat.com/
MIT License
235 stars 45 forks source link

Make clearing diagnostics file happen during tracking #1685

Closed tonidero closed 2 months ago

tonidero commented 2 months ago

Description

We were clearing the diagnostics file during SDK configuration if we detected the file to be too big. We could make this clearing happen during tracking of events. Advantages of this:

This shouldn't be a problem performance-wise since we are doing all this in a background thread + checking the file size is pretty quick.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 74.28571% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 83.31%. Comparing base (22d7098) to head (46257e5).

:exclamation: Current head 46257e5 differs from pull request most recent head dd0ce31. Consider uploading reports for the commit dd0ce31 to get more accurate results

Files Patch % Lines
...otlin/com/revenuecat/purchases/PurchasesFactory.kt 20.00% 3 Missing and 1 partial :warning:
.../purchases/common/diagnostics/DiagnosticsHelper.kt 75.00% 3 Missing :warning:
...purchases/common/diagnostics/DiagnosticsTracker.kt 83.33% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1685 +/- ## ========================================== + Coverage 83.27% 83.31% +0.04% ========================================== Files 220 221 +1 Lines 7539 7522 -17 Branches 1061 1059 -2 ========================================== - Hits 6278 6267 -11 + Misses 842 836 -6 Partials 419 419 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

RevenueCat-Danger-Bot commented 2 months ago
1 Message
:book: Size increase: 4.03 KB

Generated by :no_entry_sign: Danger