Diagnostics#811
Conversation
1ad98fb to
09372df
Compare
| * Examples of this information include response times, cache hits or error codes. | ||
| * This information will be anonymized so it can't be traced back to the end-user. | ||
| * The default value is false. | ||
| */ |
There was a problem hiding this comment.
These docs weren't actually reviewed. So would appreciate a look here before merging this.
|
Tests still failing due to sdkman, but in the meantime, I will need an approval to get this merged. All code has already been reviewed except that documentation comment |
Codecov Report
@@ Coverage Diff @@
## main #811 +/- ##
==========================================
+ Coverage 81.54% 82.48% +0.93%
==========================================
Files 121 131 +10
Lines 3999 4339 +340
Branches 512 549 +37
==========================================
+ Hits 3261 3579 +318
- Misses 535 543 +8
- Partials 203 217 +14
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
| # Enable auto-env through the sdkman_auto_env config | ||
| # Add key=value pairs of SDKs to use below | ||
| java=11.0.13-librca | ||
| java=11.0.17-librca |
There was a problem hiding this comment.
This was bumped to try to fix sdkman issues. Didn't help but I thought it was worth updating since the older version doesn't seem to appear on sdkman versions list
|
Let's make sure we merge this with "rebase" and not "squash" to keep the commit history? 🙏🏻 |
👏🏻 |
I think we need to squash it so it appears as a single commit on main and the changelog generation works correctly? I guess we could modify it after it's been generated but that would probably dirty the history a bit. Does that make sense @NachoSoto ? |
|
I'm mainly thinking that having a 3000 line commit might be harder to manage if we need to |
Sounds good! I will do that then. Also, can I get an approval here @RevenueCat/coresdk ? |
### Description Based on #787 This PR adds support to enable/disable diagnostics (disabled by default) and adds all the plumbing to sync diagnostics when configuring the SDK.
…795) ### Description Based on #793 This PR refactors previous code to split the `DiagnosticsManager` into `DiagnosticsTracker` and `DiagnosticsSynchronizer`. This is a prerequisite to avoid circular dependencies when tracking request data. - Before: `DiagnosticsManager`->`Backend`->`HttpClient`->`DiagnosticsManager`. - After: `DiagnosticsSynchronizer`->`Backend` for syncing and `HttpClient`->`DiagnosticsTracker` for tracking requests I could have tried to extract this logic from the HttpClient, but that would be a bigger refactor. This was the simplest solution I thought for this problem. Also, sorry I didn't see that issue before. I didn't modify the #785 PR directly to try to avoid some conflicts that would happen if I did it there directly.
### Description Based on #795 Deals with [CSDK-655](https://revenuecats.atlassian.net/browse/CSDK-655) ### Changes - Adds functionality to send an `endpoint_hit` event to the diagnostics endpoint on every request - Adds the `Endpoint` class with the enpoints we support, instead of hardcoding the path on each method. - Adds functionality to detect whether a response comes from the backend or the cache. [CSDK-655]: https://revenuecats.atlassian.net/browse/CSDK-655?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
### Description Deals with [SDK-2865](https://linear.app/revenuecat/issue/SDK-2865/add-random-jitter-to-diagnostics-requests) This increases the jittering we add for diagnostics calls to make sure they don't cause any interference with the main SDK calls.
### Description This PR we are adapting the code to the latest changes in the backend. ### Changes - We've removed `exceptions` as a type of diagnostic, those can be sent as a Log/Event - We've renamed `DiagnosticsEvent` to `DiagnosticsEntry` - We've renamed `DiagnosticsEvent.Log` to `DiagnosticsEntry.Event` - Renamed "type" of `DiagnosticsEntry.Event` to `event` - Enabled diagnostics and verbose logs in purchase tester.
dc3904a to
1e41da9
Compare
**This is an automatic release.** ### New Features * Diagnostics (#811) via Toni Rico (@tonidero) ### Dependency Updates * Bump fastlane from 2.212.0 to 2.212.1 (#821) via dependabot[bot] (@dependabot[bot]) * Bump fastlane from 2.211.0 to 2.212.0 (#808) via dependabot[bot] (@dependabot[bot]) * Bump fastlane-plugin-versioning_android from 0.1.0 to 0.1.1 (#798) via dependabot[bot] (@dependabot[bot]) * Bump danger from 8.6.1 to 9.2.0 (#778) via dependabot[bot] (@dependabot[bot]) ### Other Changes * Fix bundle install on CircleCI (#827) via Cesar de la Vega (@vegaro) * Update README.md to include minimum Kotlin version (#786) via Cesar de la Vega (@vegaro) * Remove `tag_release_with_latest_if_needed` fastlane lane (#781) via Cesar de la Vega (@vegaro) * Adds docs for timeouts when closing and releasing (#759) via Cesar de la Vega (@vegaro) * Add Amazon App tester package to purchase tester queries (#789) via Stefan Wehner (@tonidero) --------- Co-authored-by: revenuecat-ops <ops@revenuecat.com> Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
## 5.8.2⚠️ ⚠️ ⚠️ ⚠️ Android SDK versions 5.8.0 and 5.8.1 have a major bug that prevents sending purchase tokens to RevenueCat. Users will get charged but won't receive entitlements. An automatic refund will occur after 72 hours unless an unaffected SDK version is used. Downgrade to 5.7.1 or upgrade to 5.8.2 or later to avoid this bug. Users who got charged while using 5.8.0 and 5.8.1 will be able to access their purchases automatically upon opening an app that uses 5.7.1 or lower, or 5.8.2 or higher.⚠️ ⚠️ ⚠️ ⚠️ ### Other changes in 5.8.0 and 5.8.1 ### New Features * Diagnostics (#811) via Toni Rico (@tonidero) ### Bugfixes * Fix issue with missing subscriber attributes if set after login but before login callback (#809) via Toni Rico (@tonidero) ### Dependency Updates * Bump fastlane from 2.212.0 to 2.212.1 (#821) via dependabot[bot] (@dependabot[bot]) * Bump fastlane from 2.211.0 to 2.212.0 (#808) via dependabot[bot] (@dependabot[bot]) * Bump fastlane-plugin-versioning_android from 0.1.0 to 0.1.1 (#798) via dependabot[bot] (@dependabot[bot]) * Bump danger from 8.6.1 to 9.2.0 (#778) via dependabot[bot] (@dependabot[bot]) ### Other Changes * Fix docs deployment (#836) via Toni Rico (@tonidero) * Fix SDKMAN issues (#822) via Toni Rico (@tonidero) * Fix bundle install on CircleCI (#827) via Cesar de la Vega (@vegaro) * Update README.md to include minimum Kotlin version (#786) via Cesar de la Vega (@vegaro) * Remove `tag_release_with_latest_if_needed` fastlane lane (#781) via Cesar de la Vega (@vegaro) * Adds docs for timeouts when closing and releasing (#759) via Cesar de la Vega (@vegaro) * Add Amazon App tester package to purchase tester queries (#789) via Stefan Wehner (@tonidero) --------- Co-authored-by: revenuecat-ops <ops@revenuecat.com> Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
Description
This is the integration branch for all the Diagnostics feature. All code here has already been reviewed in different PRs.
This feature allows developers to opt-in to send us diagnostics information through a flag in the
PurchasesConfigurationobject. This information is anonymized and will only be used to improve the RevenueCat product.