davsclaus commented on code in PR #20529:
URL: https://github.com/apache/camel/pull/20529#discussion_r2639871304


##########
components/camel-telemetry/src/main/java/org/apache/camel/telemetry/TraceProcessorsInterceptStrategy.java:
##########
@@ -39,16 +45,16 @@ public Processor wrapProcessorInInterceptors(
             CamelContext camelContext,
             NamedNode processorDefinition, Processor target, Processor 
nextTarget)
             throws Exception {
-        return new DelegateAsyncProcessor(new TraceProcessor(target, 
processorDefinition));
+        return new TraceProcessor(target, processorDefinition);
     }
 
-    private class TraceProcessor implements Processor {
+    private class TraceProcessor extends DelegateAsyncProcessor {
         private final NamedNode processorDefinition;
-        private final Processor target;
+        final AsyncProcessor asyncProcessor;
 
         public TraceProcessor(Processor target, NamedNode processorDefinition) 
{
-            this.target = target;
             this.processorDefinition = processorDefinition;
+            this.asyncProcessor = 
AsyncProcessorConverterHelper.convert(target);

Review Comment:
   I think you should call super ( convert ) and not a private field in this 
class
   and then use getProcessor() in the code so it uses the one from super.
   then the processor is also part of the lifecycle with start/stop



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