newrelic / newrelic-android-agent

SDK to enable instrumentation of Android mobile apps in New Relic
Apache License 2.0
13 stars 12 forks source link

[NR-235235] Only clear metrics when onHarvestComplete #255

Closed ywang-nr closed 1 month ago

ywang-nr commented 1 month ago

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

What's changed:

  1. Remove metrics.clear() from onHarvestError and onHarvestSendFailure
  2. Double checked all the .clear() functions
  3. Unit tests updated
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 57.15%. Comparing base (e049696) to head (2529d98).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #255 +/- ## ============================================= - Coverage 57.15% 57.15% -0.01% Complexity 3344 3344 ============================================= Files 325 325 Lines 16608 16606 -2 Branches 1817 1817 ============================================= - Hits 9493 9491 -2 Misses 6107 6107 Partials 1008 1008 ```

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