JaCoCo coverage metrics changed by enabling Sentry `tracingInstrumentation`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- build-system, mobile, testing
Research direction
The issue names no repository files or tests; start by reproducing the Android unit-test coverage comparison with tracingInstrumentation enabled and disabled using the reported Gradle, AGP, Sentry, and JaCoCo versions. Compare the JaCoCo reports to identify the instrumentation effect, then confirm that the default tracing instrumentation no longer changes coverage.
Written by the indexing model from the issue text.
Description
Integration
sentry-android
Build System
Gradle
AGP Version
8.5.0
Proguard
Enabled
Version
7.14.0
Steps to Reproduce
(opening on behalf of a customer)
- Run unit test suite, measure coverage with JaCoCo without Sentry instrumented [customer is using Jacoco
0.8.7] - Instrument Sentry, using the default Sentry gradle plugin settings [waiting to confirm which version of AGP customer uses], and rerun unit test suite. Coverage of the unit test suite drops by 15%:
Customer:
The total # of lines seen by Jacoco is approx. the same, but we see a large shift from "covered lines" <--> "missed lines"
Jacoco includes all the classes as part of the "Sessions" in the report, but I dont see any new Sentry-related files classes there, at least nothing with sentry in the package, so it might be something else going on. It's a little tricky for me to more interesting analysis with my current setup (i.e. look for patterns of what classes/lines are no longer covered).
- disable
tracingInstrumentationper https://docs.sentry.io/platforms/android/troubleshooting/#auto-instrumentation-issues. Rerun unit test suite, it is back to the same coverage number as in step 1
Customer:
Confirming that addingtracingInstrumentation { enabled = false }to our gradle setup fixes the coverage issue
Expected Result
Expected result is that default Gradle tracingInstrumentation should not affect test coverage.
Actual Result
Unit test coverage drops by 15%, which we do not want. Is there an alternative to keep coverage normal, other than disabling tracingInstrumentation?
- Dominant language
- Kotlin
- Stars
- 184
- Forks
- 41
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 19
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-android-gradle-plugin
-
Android Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
getsentry/sentry-android-gradle-plugin#1369 · 1 comment ·
Maintainers usually reply within 1 day
-
Android good first issue Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getsentry/sentry-android-gradle-plugin#1266 · 1 comment ·
Maintainers usually reply within 1 day
-
Android Feature Stale Waiting for: Community
Difficulty 4/5 3-5 days Newbie friendliness 45/100
getsentry/sentry-android-gradle-plugin#1406 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Task
Difficulty 4/5 3-5 days Newbie friendliness 45/100
getsentry/sentry-android-gradle-plugin#1354 · 1 comment ·
Maintainers usually reply within 1 day
-
AutoInstallState uses a process-global mutable singleton (project-isolation violation)May be free again @runningcode claimed this 61 days ago, and no pull request is open. OpenBug
getsentry/sentry-android-gradle-plugin#1351 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in getsentry/sentry-android-gradle-plugin
Similar issues
-
go 🏃 testing 🧪
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
valkey-io/valkey-glide#7239 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ethereum-lists/chains#8788 ·
Maintainers usually reply within 1 day
-
unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
thunderbird/thunderbird-android#11654 · 2 comments ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tauri-apps/tauri#16173 ·
Maintainers usually reply within 2 days
-
feature
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day