JiriOndrusek commented on code in PR #22653:
URL: https://github.com/apache/camel/pull/22653#discussion_r3093883326


##########
components/camel-telemetry/src/main/java/org/apache/camel/telemetry/decorators/AbstractMessagingSpanDecorator.java:
##########
@@ -60,4 +61,16 @@ protected String getMessageId(Exchange exchange) {
         return null;
     }
 
+    @Override
+    public String getSpanKind(String operationName) {
+        try {
+            return switch (Op.valueOf(operationName)) {
+                case EVENT_RECEIVED -> "CONSUMER";
+                case EVENT_SENT -> "PRODUCER";
+                default -> "INTERNAL";
+            };
+        } catch (IllegalArgumentException | NullPointerException e) {

Review Comment:
   done



##########
components/camel-telemetry/src/main/java/org/apache/camel/telemetry/Tracer.java:
##########
@@ -286,7 +287,8 @@ protected void beginProcessorSpan(Exchange exchange, String 
processorName) throw
             // there is some inconsistency
             LOG.warn("Processor tracing parent should not be null!");
         }
-        Span span = spanLifecycleManager.create(processorName, parentSpan, 
spanDecorator.getExtractor(exchange));
+        Span span = spanLifecycleManager.create(processorName, 
spanDecorator.getSpanKind(Op.EVENT_PROCESS.toString()),

Review Comment:
   done



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