atiaomar1978-hub opened a new pull request, #26148: URL: https://github.com/apache/camel/pull/26148
## Summary Implements [CAMEL-23395](https://issues.apache.org/jira/browse/CAMEL-23395): per-iteration agentic loop tracing and lightweight lifecycle events for `camel-openai` MCP auto-tool execution. _AI-generated on behalf of atiaomar1978-hub_ ### Changes - Add `AgenticIterationTrace` and `AgenticToolCallTrace` records (`@since 4.23`) - Publish exchange property `CamelOpenAIAgenticTrace` with per-iteration tool calls, truncated args/results, token usage, and duration (unique 1-based sequence per model call) - Emit Custom lifecycle events (not `ExchangeEvent`) for EventNotifier listeners: - `OpenAIAgenticLoopStartedEvent` - `OpenAIAgenticToolCallExecutedEvent` - `OpenAIAgenticLoopCompletedEvent` - Wire observability into `OpenAIProducer.processNonStreamingAgentic()` with `try/finally` failure-path finalization - Record LLM round before token-budget abort; set `stopReason` at throw sites - Extend `McpToolCallExecutor.ToolResult` with `durationMs` and `success`; report parallel timeout duration - Document trace property and events in `openai-mcp.adoc` ### Notes - Cumulative token headers (`CamelOpenAIAgentic*Tokens`) were already on main via CAMEL-23393; this PR adds the per-iteration trace and events only. - Events implement `CamelEvent` (Custom type) but intentionally not `ExchangeEvent` to avoid polluting generic exchange lifecycle metrics. ## Testing ```bash ./mvnw -pl components/camel-ai/camel-openai test -Dtest=OpenAIAgentic* ``` -- 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]
