atiaomar1978-hub commented on PR #25989:
URL: https://github.com/apache/camel/pull/25989#issuecomment-5501078330

   _AI-generated comment on behalf of the PR author (`atiaomar1978-hub`) via 
Cursor Cloud Agent._
   
   **GitHub:** authenticated (`gh auth status` ✓)  
   **PR:** https://github.com/apache/camel/pull/25989  
   **Head commit:** `2d18dfdab695869087852cd8eeb6bcd08646e6c4`
   
   ---
   
   Thanks @Croway for the review — the implementation has been simplified per 
your suggestions in commit `2d18dfda`.
   
   ### Changes applied
   
   **1. Missing `camel-ai-observability` on classpath** — one-time INFO log 
inside `resolveBridge()` (already cached per `CamelContext`):
   
   ```java
   private static ImplBridge resolveBridge(CamelContext camelContext) {
       Class<?> implClass = 
camelContext.getClassResolver().resolveClass(IMPL_CLASS);
       if (implClass == null) {
           LOG.info(
                   "GenAI observability is enabled but camel-ai-observability 
is not on the classpath; "
                    + "spans and metrics will not be emitted");
           return UNAVAILABLE_BRIDGE;
       }
       // ...
   }
   ```
   
   File: 
https://github.com/atiaomar1978-hub/camel/blob/feature/CAMEL-24570-genai-observability-noop-warnings-c587/components/camel-ai/camel-ai-observability-api/src/main/java/org/apache/camel/component/ai/observability/GenAiObservability.java#L84-L100
   
   **2. Missing Micrometer tracing handler** — `AtomicBoolean` on the cached 
observation backend, INFO consistently:
   
   ```java
   private final AtomicBoolean missingTracingReported = new AtomicBoolean();
   // ...
   if (!hasTracingContext(observation)
           && missingTracingReported.compareAndSet(false, true)) {
       LOG.info(
               "No Micrometer tracing context was created for GenAI 
observations; "
                + "configure a tracing handler and exporter");
   }
   ```
   
   File: 
https://github.com/atiaomar1978-hub/camel/blob/feature/CAMEL-24570-genai-observability-noop-warnings-c587/components/camel-ai/camel-ai-observability/src/main/java/org/apache/camel/component/ai/observability/GenAiMicrometerObservationSupport.java#L41-L76
   
   **3. Removed** per review:
   - `GenAiObservabilityDiagnostics` map / enum / synchronization / reset hooks
   - Upgrade guide entry (`camel-4x-upgrade-guide-4_23.adoc`)
   - Catalog doc entry (`ai-observability.adoc`)
   - Reflective bridge injection in tests
   
   ### Tests
   
   Local run (45 tests, 0 failures):
   
   ```bash
   mvn test -pl 
components/camel-ai/camel-ai-observability-api,components/camel-ai/camel-ai-observability
 -DskipITs
   ```
   
   Ready for re-review when CI is green.
   


-- 
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]

Reply via email to