atiaomar1978-hub commented on PR #25337: URL: https://github.com/apache/camel/pull/25337#issuecomment-5188337340
## Phase 1 implementation summary _AI-generated comment on behalf of atiaomar1978-hub_ This PR implements Claus Ibsen's Phase 1 scope from [CAMEL-23861](https://issues.apache.org/jira/browse/CAMEL-23861): | Requirement | Implementation | |-------------|----------------| | langchain4j + openai | Integrated in chat, tools, agent, embeddings, openai producers | | Model headers | Request/response model headers on all langchain4j components | | Global toggle | `camel.ai.observability.enabled` (default `true`) | | OTel then Micrometer | CLIENT spans via `camel-telemetry`; metrics via `MeterRegistry` | ### Review fixes already applied - **Tracer lookup:** `CamelContext.hasService(Tracer.class)` (not registry-only lookup) - **Agent model resolution:** `AbstractAgent.getChatModel()` so observability tags are not `unknown` - **Span propagation:** `CamelHeadersSpanContextPropagationExtractor` to avoid NPE in OpenTelemetry create path - **Span kind:** `CLIENT` for GenAI client calls - **OpenAI streaming:** observability wrapper on streaming path (duration span; token counts N/A until stream completes) ### Tests ``` mvn test -pl components/camel-ai/camel-ai-observability -am -DskipITs ``` 12 unit tests in `camel-ai-observability` (model resolver, toggle, Micrometer metrics, OTel span attributes). Ready for 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]
