DataDog / dd-sdk-android

Datadog SDK for Android (Compatible with Kotlin and Java)
Apache License 2.0
140 stars 56 forks source link

Add OpenTelemetry Proguard rules for compile-only annotations #2080

Closed 0xnm closed 3 weeks ago

0xnm commented 3 weeks ago

What does this PR do?

There is the following Proguard error when trying to minify OpenTelemetry module:

ERROR: R8: Missing class com.google.auto.value.AutoValue (referenced from: io.opentelemetry.api.common.AttributeKeyImpl and 2 other contexts)
Missing class com.google.errorprone.annotations.MustBeClosed (referenced from: io.opentelemetry.context.Scope io.opentelemetry.context.Context.makeCurrent() and 3 other contexts)

In fact both these annotations are not needed in runtime, so it is safely to ignore them.

Review checklist (to be filled by reviewers)

codecov-commenter commented 3 weeks ago

Codecov Report

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

Project coverage is 68.56%. Comparing base (5197289) to head (88ff084).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #2080 +/- ## =========================================== - Coverage 68.73% 68.56% -0.17% =========================================== Files 719 719 Lines 26571 26567 -4 Branches 4472 4472 =========================================== - Hits 18262 18214 -48 - Misses 7123 7138 +15 - Partials 1186 1215 +29 ``` [see 28 files with indirect coverage changes](https://app.codecov.io/gh/DataDog/dd-sdk-android/pull/2080/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog)