Skip to content

prom exporter: exclude shaded protobuf#7355

Merged
jack-berg merged 2 commits intoopen-telemetry:mainfrom
zeitlinger:exclude-bundled-protobuf
Jun 5, 2025
Merged

prom exporter: exclude shaded protobuf#7355
jack-berg merged 2 commits intoopen-telemetry:mainfrom
zeitlinger:exclude-bundled-protobuf

Conversation

@zeitlinger
Copy link
Member

See https://prometheus.github.io/client_java/exporters/formats/#exclude-the-shaded-protobuf-classes

runtime classpath

+--- io.prometheus:prometheus-metrics-exporter-httpserver -> 1.3.7
|    \--- io.prometheus:prometheus-metrics-exporter-common:1.3.7
|         +--- io.prometheus:prometheus-metrics-model:1.3.7
|         \--- io.prometheus:prometheus-metrics-exposition-textformats:1.3.7
|              +--- io.prometheus:prometheus-metrics-model:1.3.7
|              \--- io.prometheus:prometheus-metrics-config:1.3.7
\--- io.prometheus:prometheus-metrics-exposition-formats-no-protobuf -> 1.3.7
     +--- io.prometheus:prometheus-metrics-exposition-textformats:1.3.7 (*)
     \--- com.google.protobuf:protobuf-java:4.30.2 -> 4.31.0

@zeitlinger zeitlinger requested a review from a team as a code owner May 19, 2025 14:07
@zeitlinger zeitlinger self-assigned this May 19, 2025
@codecov
Copy link

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.76%. Comparing base (cc7d085) to head (c60fbe1).
Report is 26 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7355      +/-   ##
============================================
- Coverage     89.87%   89.76%   -0.11%     
- Complexity     6899     6978      +79     
============================================
  Files           786      797      +11     
  Lines         20793    21165     +372     
  Branches       2026     2056      +30     
============================================
+ Hits          18687    18999     +312     
- Misses         1465     1504      +39     
- Partials        641      662      +21     

☔ View full report in Codecov by Sentry.
📢 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.

@zeitlinger
Copy link
Member Author

@jack-berg can you take a look?

implementation("io.prometheus:prometheus-metrics-exporter-httpserver") {
exclude(group = "io.prometheus", module = "prometheus-metrics-exposition-formats")
}
implementation("io.prometheus:prometheus-metrics-exposition-formats-no-protobuf")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can get away with io.prometheus:prometheus-metrics-exposition-textformats, and adding io.prometheus:prometheus-metrics-exposition-formats-no-protobuf as a testImplementation dependency. Pushing a commit to do this so we can get this in for tomorrow's release!

@jack-berg jack-berg merged commit 5e50aa7 into open-telemetry:main Jun 5, 2025
47 of 49 checks passed
@zeitlinger zeitlinger deleted the exclude-bundled-protobuf branch June 6, 2025 09:52
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.

2 participants