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-234747] Metrics cleanup #252

Closed cthomas-newrelic closed 2 months ago

cthomas-newrelic commented 2 months ago

chore: clean up and update metrics (measurements)

This is a big atomic merge, touches a lot of files. The code was old and crufty. Improves testing of the trace/activity/measurement/metrics components, adds tests were they were missing.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 86.66667% with 26 lines in your changes missing coverage. Please review.

Project coverage is 57.15%. Comparing base (b245ce1) to head (88dd109).

Files Patch % Lines
...java/com/newrelic/agent/android/metric/Metric.java 91.66% 1 Missing and 6 partials :warning:
...easurement/consumer/MetricMeasurementConsumer.java 80.00% 2 Missing and 1 partial :warning:
...ent/consumer/SummaryMetricMeasurementConsumer.java 88.46% 0 Missing and 3 partials :warning:
.../java/com/newrelic/agent/android/Measurements.java 86.66% 1 Missing and 1 partial :warning:
...com/newrelic/agent/android/metric/MetricStore.java 66.66% 0 Missing and 2 partials :warning:
.../com/newrelic/agent/android/stats/StatsEngine.java 50.00% 1 Missing and 1 partial :warning:
...ain/java/com/newrelic/agent/android/TaskQueue.java 85.71% 0 Missing and 1 partial :warning:
.../agent/android/instrumentation/MetricCategory.java 50.00% 0 Missing and 1 partial :warning:
...ewrelic/agent/android/logging/DefaultAgentLog.java 0.00% 1 Missing :warning:
...asurement/producer/NetworkMeasurementProducer.java 66.66% 0 Missing and 1 partial :warning:
... and 3 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #252 +/- ## ============================================= + Coverage 56.27% 57.15% +0.88% - Complexity 3298 3344 +46 ============================================= Files 324 325 +1 Lines 16611 16608 -3 Branches 1828 1817 -11 ============================================= + Hits 9348 9493 +145 + Misses 6253 6107 -146 + Partials 1010 1008 -2 ```

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

cthomas-newrelic commented 2 months ago

The failed smoke test timed-out. Re-ran it, successful this time.