davsclaus commented on PR #28992:
URL: https://github.com/apache/camel/pull/28992#issuecomment-6590056073
The `build (21, false)` failure is a real one: every test in
`camel-observation` fails with `NoClassDefFoundError:
io/opentelemetry/api/internal/ConfigUtil`.
Cause: the module ends up with a mix of OpenTelemetry versions on the test
classpath. `opentelemetry-sdk-testing` is pinned to `${opentelemetry-version}`
(1.67.0), but `micrometer-tracing-integration-test` 1.7.2 brings in
`opentelemetry-sdk-common`, `opentelemetry-sdk-trace`,
`opentelemetry-exporter-zipkin` and friends at **1.62.0**, and those win by
nearest-first. `mvn dependency:tree -Dopentelemetry-version=1.67.0` on
`components/camel-observation`:
```
+- io.micrometer:micrometer-tracing-integration-test:jar:1.7.2:test
| +- io.micrometer:micrometer-tracing-bridge-otel:jar:1.7.2:test
| | +- io.opentelemetry:opentelemetry-sdk-common:jar:1.62.0:test
| +- io.opentelemetry:opentelemetry-sdk-trace:jar:1.62.0:test
\- io.opentelemetry:opentelemetry-sdk-testing:jar:1.67.0:test
+- io.opentelemetry:opentelemetry-api:jar:1.67.0:test
\- io.opentelemetry:opentelemetry-sdk:jar:1.67.0:test
+- (opentelemetry-sdk-common:1.67.0 - omitted for conflict with 1.62.0)
+- (opentelemetry-sdk-trace:1.67.0 - omitted for conflict with 1.62.0)
```
In 1.67.0, `ConfigUtil` moved out of `opentelemetry-api`
(`io.opentelemetry.api.internal`) into the new `opentelemetry-common` artifact
(`io.opentelemetry.common.impl`). The 1.62.0 SDK jars still reference the old
class, so they break against api 1.67.0. It only worked with 1.66.0 because
that api jar still had the class.
Suggested fix: import the OpenTelemetry BOMs in
`components/camel-observation/pom.xml`, as `camel-opentelemetry2` already does,
so all `io.opentelemetry` artifacts align on `${opentelemetry-version}`:
```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-bom</artifactId>
<version>${opentelemetry-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-bom-alpha</artifactId>
<version>${opentelemetry-alpha-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```
Since Dependabot owns this branch, the fix can go in a separate PR on `main`
first; then rebase this one (`@dependabot rebase`).
_Claude Code on behalf of davsclaus_
--
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]