lhotari opened a new pull request, #25662: URL: https://github.com/apache/pulsar/pull/25662
### Motivation Keep Pulsar's OpenTelemetry stack on supported, non-deprecated APIs by upgrading the three OTel artifacts together: - `opentelemetry-java`: 1.56.0 → 1.61.0 - `opentelemetry-java-instrumentation`: 2.21.0 → 2.27.0 - `opentelemetry-semantic-conventions`: 1.37.0 → 1.41.0 The instrumentation 2.27.0 release deprecates the `opentelemetry-runtime-telemetry-java17` module (and its `RuntimeMetrics` / `RuntimeMetricsBuilder` API) in favor of the unified `opentelemetry-runtime-telemetry` module's `RuntimeTelemetry` API, so this PR also migrates `OpenTelemetryService` off that deprecated API. ### Modifications - `gradle/libs.versions.toml`: bump the three OTel version refs and switch the runtime-telemetry library coordinate from `opentelemetry-runtime-telemetry-java17` to the unified `opentelemetry-runtime-telemetry`. - `pulsar-opentelemetry/build.gradle.kts`: use the renamed library alias. - `pulsar-opentelemetry/.../OpenTelemetryService.java`: replace `RuntimeMetrics.builder(...).disableAllFeatures().emitExperimentalTelemetry().build()` with `RuntimeTelemetry.builder(...)` plus `Internal.setDisableAllJfrFeatures(builder, true)` and `Experimental.setEmitExperimentalMetrics(builder, true)` (the replacements named in the deprecation javadoc), preserving the existing JMX-only, experimental-enabled behavior. - `distribution/server/src/assemble/LICENSE.bin.txt`: update the bundled-jar list (the two `runtime-telemetry-java17` / `-java8` entries collapse into a single `runtime-telemetry` jar — verified via `:dependencies` against `pulsar-broker`, `pulsar-proxy`, `pulsar-functions-worker`, `pulsar-testclient`, and `pulsar-opentelemetry` runtime classpaths). A clean recompile of all OTel-touching modules (`pulsar-opentelemetry`, `pulsar-broker`, `pulsar-client-original`, `pulsar-broker-common`, `pulsar-metadata`, `pulsar-proxy`, `pulsar-functions-worker`, `pulsar-transaction-coordinator`, `pulsar-testclient`) emits zero OTel-related deprecation warnings after this change. ### Verifying this change - [ ] Make sure that the change passes the CI checks. This change is already covered by existing tests, specifically `pulsar-opentelemetry`'s `OpenTelemetryServiceTest` — including `testJvmRuntimeMetrics`, which asserts that JMX-sourced runtime metrics (`jvm.cpu.time`, `jvm.memory.used`, `jvm.gc.duration`, `jvm.thread.count`, `jvm.class.count`, etc.) are still emitted after the runtime-telemetry API switch. ### Does this pull request potentially affect one of the following parts: - [x] Dependencies (add or upgrade a dependency) The OpenTelemetry Java SDK, instrumentation, and semantic-conventions artifacts are upgraded; the runtime-telemetry dependency coordinate changes from `opentelemetry-runtime-telemetry-java17` to the unified `opentelemetry-runtime-telemetry`. No public Pulsar API changes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
