davsclaus opened a new pull request, #23843:
URL: https://github.com/apache/camel/pull/23843

   ## Summary
   
   - Introduces `EndpointSending` marker interface in `camel-api` for 
processors that send exchanges to endpoints (`to`, `toD`, `wireTap`, `enrich`)
   - `TraceProcessorsInterceptStrategy` now skips creating redundant processor 
spans for `EndpointSending` processors — the endpoint event span (`EVENT_SENT`) 
already captures destination, timing, and status
   - Reduces span tree depth and total span count, addressing span explosion 
reported in CAMEL-23564 (production user with 300+ Camel apps)
   - All camel-telemetry (153 tests) and camel-opentelemetry2 (26 tests) pass 
with updated span count assertions
   - Adds upgrade guide note in the 4.21 upgrade guide
   
   ## Details
   
   Previously, EIPs like `to` created two spans in parent-child:
   1. `EVENT_PROCESS` (processor span) — wraps the processor execution
   2. `EVENT_SENT` (endpoint event span) — captures the actual send to the 
endpoint
   
   The processor span added no value since the event span already provides 
complete observability. This doubled the span tree depth unnecessarily.
   
   The `EndpointSending` marker interface signals "this processor will produce 
its own endpoint span via `ExchangeSendingEvent`". The intercept strategy walks 
the delegate chain (needed when otel2 wraps processors) to find the underlying 
processor.
   
   `PollEnricher`/`PollProcessor` are excluded — they use `ConsumerCache` 
(poll/receive), not `ProducerCache`, and don't emit `ExchangeSendingEvent`.
   
   ## Test plan
   
   - [x] All 153 camel-telemetry tests pass with updated span counts
   - [x] All 26 camel-opentelemetry2 tests pass with updated span counts and 
hierarchy assertions
   - [x] Non-send EIPs (log, bean, split, etc.) continue to produce processor 
spans
   - [x] Delegate chain unwrapping works correctly when otel2 double-wraps 
processors
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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