Fix opentelemetry example: bump javaagent for JDK 25 compatibility - #208
Open
Croway wants to merge 1 commit into
Open
Fix opentelemetry example: bump javaagent for JDK 25 compatibility#208Croway wants to merge 1 commit into
Croway wants to merge 1 commit into
Conversation
The pinned opentelemetry-javaagent 1.25.1 (mid-2023, duplicated across the 4 booking module poms) silently fails to attach on JDK 25 (InaccessibleObjectException), so no spans reach Jaeger with no obvious startup error. Bump to 2.19.0, already proven working in the observability-services and rest-cxf-opentelemetry examples in this repo, and centralize the property in the opentelemetry parent pom. The newer agent also defaults its OTLP exporter to HTTP/protobuf (port 4318) instead of gRPC (4317), so expose 4318 on the otel-collector service in the docker-compose stack - the collector already listens on it, it just wasn't published to the host. Verified end-to-end on JDK 25 against the real docker-compose stack: sync and async bookTrip requests return 200, full distributed traces (27 and 45 spans) land in Jaeger across all 4 services, and Camel exchange metrics are scraped by Prometheus. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wgr7MBBqUbNGG6xrH6ybWq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
opentelemetryexample's 4 booking modules (CarBooking, FlightBooking, HotelBooking, TripBooking) pinnedopentelemetry-javaagentto1.25.1(mid-2023), duplicated across each module's pom. That version silently fails to attach on JDK 25 (InaccessibleObjectException), so no spans reach Jaeger with no obvious startup error - it only worked when re-run on JDK 17.2.19.0, matching the version already proven working in this repo'sobservability-servicesandrest-cxf-opentelemetryexamples, and centralized the property in theopentelemetryparent pom instead of duplicating it 4 times.otel-collectorservice already listens on 4318 but didn't publish it to the host, so exposed that port too.Test plan
mvn installbuilds all 4 modules on JDK 25, agent 2.19.0 downloaded/copied/camel/bookTrip) and async/Kafka (/camel/asyncBookTrip) requests both return 200