Croway opened a new pull request, #2107: URL: https://github.com/apache/camel-spring-boot/pull/2107
## Description [CAMEL-27134](https://issues.apache.org/jira/browse/CAMEL-27134): `SpringBootPlatformHttpConsumer` hands each request to the executor and runs the route there, without the context of the servlet thread. With Micrometer Tracing (for example `spring-boot-starter-opentelemetry`) and `camel-opentelemetry2`, the route spans therefore start a separate trace instead of joining the `http post ...` span that Spring MVC records for the same request. When `io.micrometer:context-propagation` is on the classpath (it comes with Micrometer Tracing), the consumer now wraps the task with Spring's `ContextPropagatingTaskDecorator`, as `spring.task.execution.propagate-context=true` does for Spring's own executors: the context is captured on the servlet thread and restored on the executor thread. Without the library the task runs as before. The dependency is optional in the starter, and its version comes from Spring Boot's dependency management. ## Tests - New `SpringBootPlatformHttpContextPropagationTest`: a route on a `task-*` thread looks for the Observation that Spring MVC opened for the request. Without the change it gets "no observation of the request"; with it, it finds `http.server.requests GET /observed`. - All tests of the starter pass: 144 unit tests (2 skipped) and 11 integration tests. The starter page gains a short usage section (`src/main/doc/usage.adoc`, regenerated into `docs/.../starters/platform-http.adoc`). _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]
