ammachado opened a new pull request, #23684: URL: https://github.com/apache/camel/pull/23684
## What Introduces `camel-test-infra-jaeger`, a new test infrastructure module that provides a containerised [Jaeger 2.x](https://www.jaegertracing.io/) all-in-one instance for integration tests that need a real OpenTelemetry collector and UI. The Jaeger 2.x image (`cr.jaegertracing.io/jaegertracing/jaeger:2.18.0`) bundles: - **OTLP gRPC collector** on port 4317 - **OTLP HTTP collector** on port 4318 - **Jaeger query / UI** on port 16686 ## Module structure Follows the same pattern as `camel-test-infra-redis` and every other test-infra module: | Class | Role | |---|---| | `JaegerProperties` | Port constants and system-property keys | | `JaegerInfraService` | Interface: `host()`, `collectorGrpcPort()`, `collectorHttpPort()`, `queryUiPort()` + URL helpers | | `JaegerService` | Composite interface (`TestService + JaegerInfraService + ContainerTestService`) | | `JaegerContainer` | `GenericContainer` wrapper; waits for the UI on port 16686 | | `JaegerLocalContainerInfraService` | `@InfraService`-annotated container lifecycle; registers all ports as system properties | | `JaegerRemoteInfraService` | Reads host/ports from system properties for CI or pre-started instances | | `JaegerServiceFactory` | `createService()` + `builder()` for local/remote selection | Also registered in `test-infra/pom.xml` and `camel-test-infra-all/pom.xml`. ## Demo application `JaegerTestApp` (in `src/test/java`) is a runnable demo that: 1. Starts the container and prints the UI URL 2. Sends three realistic Camel-style traces using the OTLP HTTP exporter: - **`get-product-route`** — cache miss → JPA SELECT → map DTO → cache SET - **`submit-order-route`** — validate → JDBC INSERT → inventory HTTP call → Kafka PRODUCE - **`payment-processor-route`** — Kafka CONSUME → payment gateway HTTP → fraud detection → JPA INSERT → Kafka PRODUCE 3. Each trace uses correct `SpanKind` (`SERVER`/`CONSUMER`/`CLIENT`/`PRODUCER`) and semantic attributes (`db.*`, `http.*`, `messaging.*`, `camel.*`) 4. Blocks until the user presses Enter, then shuts down cleanly Run it with: ```bash mvn test-compile exec:java \ -Dexec.mainClass=org.apache.camel.test.infra.jaeger.JaegerTestApp \ -Dexec.classpathScope=test \ -pl test-infra/camel-test-infra-jaeger ``` ## Testing ```bash mvn clean install -pl test-infra/camel-test-infra-jaeger -am -Dquickly ``` --- _Claude Code on behalf of Adriano Machado_ -- 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]
