haythemkh commented on a change in pull request #115:
URL: https://github.com/apache/solr/pull/115#discussion_r633568666



##########
File path: solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java
##########
@@ -603,6 +608,44 @@ public Action call() throws IOException {
 
   }
 
+  /** Get the span for this request.  Not null. */
+  protected Span getSpan() {
+    // Span was put into the request by SolrDispatchFilter
+    return (Span) 
Objects.requireNonNull(req.getAttribute(Span.class.getName()));
+  }
+
+  // called after init().
+  protected void populateTracingSpan(Span span) {
+    // Set db.instance
+    String coreOrColName = HttpSolrCall.this.origCorename;
+    if (coreOrColName == null && getCore() != null) {
+      coreOrColName = getCore().getName();
+    }
+    if (coreOrColName != null) {
+      span.setTag(Tags.DB_INSTANCE, coreOrColName);
+    }
+
+    // Set operation name.
+    String path = getPath();
+    if (coreOrColName != null) {
+      // prefix path by core or collection name
+      if (getCore() != null && getCore().getName().equals(coreOrColName)) {

Review comment:
       why not nest this block in the block above (line 621)?




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to