[Diagnostics] Add play_store_version and play_services_version to all google events#2269
Conversation
There was a problem hiding this comment.
Originally, I was planning to also add the billing_client_version as was in the doc, but I don't think we can get the version at runtime that I could figure out... We could hardcode it somewhere, but then, it basically means we already have the billing client version from the sdk version and we can obtain this info in the backend/DW.
There was a problem hiding this comment.
Just mentioning that we could quite easily create a BuildConfig field set to libs.versions.billing.get(). That doesn't require any more hardcoding than we currently do (i.e. specifying the version in libs.versions.toml). But you're right that we can also infer this info from the SDK version.
There was a problem hiding this comment.
Hmm that's a good point... But still seems like duplicated info... If we could figure out if the version didn't match at runtime (like for example if there was a bump because a dev was using a newer version of the billing client separately). But I think this way we can just have this information in the DW and even join if we need a view with this information.
📸 Snapshot Test14 modified, 378 unchanged
🛸 Powered by Emerge Tools |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2269 +/- ##
==========================================
+ Coverage 80.30% 80.31% +0.01%
==========================================
Files 278 278
Lines 9483 9489 +6
Branches 1336 1337 +1
==========================================
+ Hits 7615 7621 +6
Misses 1308 1308
Partials 560 560 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ajpallares
left a comment
There was a problem hiding this comment.
Looks good! Just a small nit that you can totally ignore 😄
JayShortway
left a comment
There was a problem hiding this comment.
This is gonna be very valuable! Just the concern on VisibleForTesting.
There was a problem hiding this comment.
Is VisibleForTesting needed? I don't see trackEvent being used in tests. I would prefer to test a class' observable behavior, instead of opening up private methods for tests.
There was a problem hiding this comment.
Unfortunately, it is currently used in some tests... For example:
We could totally refactor this to avoid making this internal, but didn't want to add further refactors in an unrelated PR. I just added this annotation because I noticed this was only used externally in tests and seemed easy to confuse with the other new trackEvent method.
Can do this change in a follow-up PR though.
There was a problem hiding this comment.
Oh right, I see. Maybe the other trackEvent method, taking a DiagnosticsEntryName, has more "right" to be internal than this one, as this one requires the caller to know the appSessionID.
Not something we need to address in this PR indeed.
7044c5d to
3682cd4
Compare
There was a problem hiding this comment.
Oh right, I see. Maybe the other trackEvent method, taking a DiagnosticsEntryName, has more "right" to be internal than this one, as this one requires the caller to know the appSessionID.
Not something we need to address in this PR indeed.
**This is an automatic release.** ## RevenueCatUI SDK ### 🐞 Bugfixes * Fix landscape mode in Paywalls v1 Template 3 (#2265) via Josh Holtz (@joshdholtz) ### Customer Center #### ✨ New Features * feat: Introduce `CustomerCenterView` for hybrid usage (#2170) via Cesar de la Vega (@vegaro) * Add `onManagementOptionSelected` to `CustomerCenterListener` (#2270) via Cesar de la Vega (@vegaro) ### Paywallv2 #### 🐞 Bugfixes * [Paywalls V2] Ignores missing font alias if it's blank. (#2271) via JayShortway (@JayShortway) * [Paywalls V2] Fixes badges not being overriden (#2266) via JayShortway (@JayShortway) ### 🔄 Other Changes * [Diagnostics] Add play_store_version and play_services_version to all google events (#2269) via Toni Rico (@tonidero) * [Diagnostics] Add `id` and `app_session_id` to events (#2268) via Toni Rico (@tonidero) * Uploads Paparazzi screenshots to Emerge. (#2232) via JayShortway (@JayShortway) Co-authored-by: revenuecat-ops <ops@revenuecat.com>

Description
This adds
play_store_versionandplay_services_versionto all google events.