Skip to content

Conversation

@ywang-nr
Copy link
Contributor

@ywang-nr ywang-nr commented Aug 11, 2025

SQUASH MERGE

Ticket: https://new-relic.atlassian.net/browse/NR-448218

What's changed:

  1. Covert sharedPreference to dataStore preference, all the data in the front-end should be the same, no UI changes.
  2. This change requires extensive testing to make sure all the data are the same as before.
  3. This change should resolve any ANRs related to sharedPreference, see ticket for linked tickets.
  4. Compiled SDK needs to be upgraded from 30 to 34 for this implementation, need to re-verify if everything is fine.
  5. Added all unit tests.
  6. Leave session replay as is for now.
  7. Cannot use rxjava library due to size increase of the agent, will have to redo all the dataStore code to use kotlin coroutines and Flow API --> still has size increase from 1M to 5.7M by solely adding kotlin library - this is resolved by excluding the libraries then using pom file to reference them. Referencing doc here

Additional notes:

  1. Unit tests failing - check whether the network is connected correctly

cmcadams-newrelic and others added 6 commits July 8, 2025 11:55
Co-authored-by: ywang-nr <[email protected]>
Co-authored-by: ywang-nr <[email protected]>
Co-authored-by: ywang-nr <[email protected]>
Co-authored-by: Steve Malsam <[email protected]>
Co-authored-by: ywang <[email protected]>
# Conflicts:
#	agent-core/src/main/java/com/newrelic/agent/android/sessionReplay/SessionReplayReporter.java
#	agent-core/src/main/java/com/newrelic/agent/android/sessionReplay/SessionReplaySender.java
#	agent/src/main/java/com/newrelic/agent/android/sessionReplay/SessionReplay.java
#	agent/src/main/java/com/newrelic/agent/android/sessionReplay/SessionReplayActivityLifecycleCallbacks.java
#	agent/src/main/java/com/newrelic/agent/android/sessionReplay/SessionReplayTextViewThingy.java
#	agent/src/main/java/com/newrelic/agent/android/sessionReplay/ViewDetails.java
#	gradle.properties
@codecov
Copy link

codecov bot commented Aug 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.34%. Comparing base (c42d081) to head (1d3cf84).
⚠️ Report is 24 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #391      +/-   ##
=============================================
+ Coverage      52.35%   54.34%   +1.99%     
+ Complexity      3476     2975     -501     
=============================================
  Files            386      307      -79     
  Lines          18970    15178    -3792     
  Branches        2093     1718     -375     
=============================================
- Hits            9932     8249    -1683     
+ Misses          7963     5997    -1966     
+ Partials        1075      932     -143     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@cmcadams-newrelic cmcadams-newrelic left a comment

Choose a reason for hiding this comment

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

LGTM!

@cmcadams-newrelic
Copy link
Contributor

reviewing the Note section in this PR's description

Additional notes:

  1. Draft PR for feedback, will continue polishing it
  2. Move on to testing

Is this PR still a "Draft"? I see you included tests. so item 2 is covered.

@ywang-nr
Copy link
Contributor Author

reviewing the Note section in this PR's description

Additional notes:

  1. Draft PR for feedback, will continue polishing it
  2. Move on to testing

Is this PR still a "Draft"? I see you included tests. so item 2 is covered.

So testing usually includes two parts.

  1. Unit tests as much as possible.
  2. Physical tests actually install the modified agents in application and make sure the correct data flows into NR.

@cmcadams-newrelic
Copy link
Contributor

@ywang-nr Sorry, I did not mean to close this PR. reopened

@ndesai-newrelic ndesai-newrelic changed the title [NR-448218] covert sharedPreferece to dataStore preference [NR-448218] convert sharedPreference to dataStore preference Aug 15, 2025
@ndesai-newrelic
Copy link
Contributor

ndesai-newrelic commented Aug 15, 2025

these changes are increasing agent size from 1MB to 10MB, don't use rx library .

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.

4 participants