beskow commented on code in PR #22677:
URL: https://github.com/apache/camel/pull/22677#discussion_r3110229166


##########
components/camel-opentelemetry2/src/main/java/org/apache/camel/opentelemetry2/OpenTelemetrySpanAdapter.java:
##########
@@ -24,18 +24,41 @@
 import io.opentelemetry.api.trace.Span;
 import io.opentelemetry.api.trace.StatusCode;
 import io.opentelemetry.context.Scope;
+import org.apache.camel.Exchange;
+import org.apache.camel.telemetry.SpanStorageManagerExchange;
 import org.apache.camel.telemetry.TagConstants;
 
 public class OpenTelemetrySpanAdapter implements 
org.apache.camel.telemetry.Span {
 
     private static final String DEFAULT_EVENT_NAME = "log";
     static final String BAGGAGE_CAMEL_FLAG = "camelScope";
 
+    private static final SpanStorageManagerExchange SPAN_STORAGE = new 
SpanStorageManagerExchange();
+
     private final Span otelSpan;
-    private final Baggage baggage;
+    private Baggage baggage;
     private Scope scope;
     private Scope baggageScope;
 
+    /**
+     * Retrieves the OpenTelemetry span associated with the given {@link 
Exchange}.
+     *
+     * <p>
+     * This method returns the span only if the current span implementation is 
backed by OpenTelemetry. If no span is
+     * present or a different tracing implementation is in use, {@code null} 
is returned.
+     * </p>
+     *
+     * @param  exchange the current Camel exchange
+     * @return          the OpenTelemetry span adapter, or {@code null} if 
unavailable
+     */
+    public static OpenTelemetrySpanAdapter fromExchange(Exchange exchange) {

Review Comment:
   Understood, I have removed it.



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