dsmiley commented on code in PR #1868:
URL: https://github.com/apache/solr/pull/1868#discussion_r1312162134


##########
solr/core/src/java/org/apache/solr/util/tracing/SimplePropagator.java:
##########
@@ -139,11 +147,15 @@ public SimplePropagatorSpanBuilder(ScopeManager 
scopeManager) {
     @Override
     public Span start() {
       if (parent != null) {
-        return new SimplePropagatorSpan(parent);
+        if (parent instanceof SimplePropagatorSpan) {
+          return (SimplePropagatorSpan) parent;
+        } else {
+          return NoopSpan.INSTANCE;
+        }
       } else if (scopeManager.activeSpan() != null) {
-        return new SimplePropagatorSpan(scopeManager.activeSpan().context());
+        return scopeManager.activeSpan();
       } else {

Review Comment:
   I think this is a double-lookup in a ThreadLocal?



-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to