Skip to content

Bundle consumer ProGuard rules for OTLP exporter - #9028

Open
2748109647 wants to merge 1 commit into
open-telemetry:mainfrom
2748109647:codex/issue-9027-otlp-r8-rules
Open

2748109647 wants to merge 1 commit into
open-telemetry:mainfrom
2748109647:codex/issue-9027-otlp-r8-rules

Conversation

@2748109647

@2748109647 2748109647 commented Nov 11, 2026 •

Copy link
Copy Markdown

Closes #9027

Problem

Android applications using the OTLP exporter can receive R8/ProGuard missing-class warnings for optional OpenTelemetry incubator and autoconfigure APIs. The OTLP module compiles against api:incubator and sdk-extensions:autoconfigure-spi as compileOnly, so consumers that do not include those optional artifacts currently need to copy suppression rules into their app.

Change

Bundle the narrow -dontwarn rules requested in the issue in META-INF/proguard/consumer-rules.pro for the opentelemetry-exporter-otlp JAR. R8 can discover consumer rules from this JAR metadata, so Android consumers no longer need to duplicate them in application configuration. The rules do not keep classes or change runtime behavior.

Verification

  • git diff --check passed.
  • A JDK 25 JAR smoke check confirmed the resource path is META-INF/proguard/consumer-rules.pro.
  • Local :exporters:otlp:all:check did not complete. Gradle stalled while resolving the Kotlin 2.4.10 compiler dependency for buildSrc; an offline retry confirmed that artifact is not cached.
  • GitHub Actions macOS/Java 21 completed :exporters:otlp:all:check and :exporters:otlp:all:build. The overall workflow remains failed: Java 21/25 runs had timeouts in unrelated sdk:metrics:testIncubating stress tests, macOS Testcontainers could not find Docker, and the Java 25 run could not resolve codeload.github.com while downloading the declarative-config schema. The changed OTLP module tasks completed without a reported failure.
  • EasyCLA still requires the account owner to sign the CNCF CLA.

Signed-off-by: Alpha <2748109647@qq.com>
@2748109647
2748109647 requested a review from a team as a code owner November 11, 2026 02:47
@linux-foundation-easycla

linux-foundation-easycla Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: 2748109647 / name: Alpha (cf0d3f3)

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-11-11 06:13 UTC

Investigate required status check failures.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Should this be with reviewers? Comment /dashboard route:reviewers to route it to them.
  • Anything wrong — including the routing? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.36%. Comparing base (53d860b) to head (cf0d3f3).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9028      +/-   ##
============================================
+ Coverage     90.33%   90.36%   +0.02%     
- Complexity    11017    11019       +2     
============================================
  Files          1021     1021              
  Lines         30124    30124              
  Branches       3933     3933              
============================================
+ Hits          27214    27222       +8     
+ Misses         1953     1942      -11     
- Partials        957      960       +3     

☔ View full report in Codecov by Harness.
📢 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
Copy Markdown
Author

I investigated the failed matrix jobs:

  • macOS / Java 21 fails in the unrelated :sdk:metrics:testIncubating task: SynchronousInstrumentStressTest.partialWriteStressTest timed out after 10 seconds.
  • macOS / Java 25 has the same metrics stress-test timeouts. It also fails :sdk-extensions:declarative-config:downloadConfigurationSchema with UnknownHostException: codeload.github.com.
  • In the Java 21 run, the changed module's :exporters:otlp:all:check and :exporters:otlp:all:build both completed.

The PR only adds the requested ProGuard consumer-rules resource, so these failures do not point to a failure in the changed module. I could not complete the local Gradle check because resolving the Kotlin 2.4.10 compiler dependency for buildSrc stalled and the artifact is not cached for offline use. Could a maintainer rerun the two failed matrix jobs when convenient?

This branch has not been deployed

No deployments
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.

Support built-in R8/ProGuard rules

1 participant