Croway opened a new pull request, #30339: URL: https://github.com/apache/camel/pull/30339
## Description Follow-up to #30291 ([CAMEL-27131](https://issues.apache.org/jira/browse/CAMEL-27131)), after the review of @squakez: the AI components must not manage the OpenTelemetry scope. As described in `design/tracing.adoc` ("Removal of explicit `camel-opentelemetry2` Scope wrapping to avoid leakage", CAMEL-23380), Camel makes the OpenTelemetry context current only while a processor runs. Removed: - `Span.openScope()` and `Span.Scope` (`camel-telemetry`), and the `OpenTelemetrySpanAdapter` implementation (`camel-opentelemetry2`). They were added by #30291 and are not released. - `GenAiObservation.makeCurrent()` and `GenAiObservation.Scope` (`camel-ai-observability-api`), its implementation, and the calls around the model, agent and tool calls in `camel-ai-tool`, `camel-langchain4j-chat`, `camel-langchain4j-agent` and `camel-openai`. Effect: when an AI framework traces the model calls itself (quarkus-langchain4j, a LangChain4j model with an observation listener), its spans are children of the route span, next to Camel's `invoke_agent` span instead of under it. Camel's own agent, model call and tool spans keep their structure, as they are linked through the exchange. The `ai-observability` page says so. The Micrometer Observation path keeps opening its observation scope, as it has since CAMEL-24561. ## Tests The unit tests of the eight changed modules pass; no test depended on the removed scope. _Claude Code on behalf of Croway_ -- 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]
