chihsuan commented on code in PR #10695:
URL: https://github.com/apache/ozone/pull/10695#discussion_r3559443581


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TraceAllMethod.java:
##########
@@ -77,7 +78,12 @@ public Object invoke(Object proxy, Method method, Object[] 
args)
       }
     }
 
-    try (TracingUtil.TraceCloseable ignored = 
TracingUtil.createActivatedSpan(name + "." + method.getName())) {
+    SpanKind spanKind = "close".equals(method.getName())
+        ? SpanKind.INTERNAL

Review Comment:
   nit: could you add a one-line comment on why close is INTERNAL while the 
rest are CLIENT? Since it's a name-based check, it'd save the next reader from 
guessing 



##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java:
##########
@@ -217,14 +227,20 @@ public static String exportCurrentSpan() {
    * @return Tracing scope.
    */
   public static Span importAndCreateSpan(String name, String encodedParent) {
+    return importAndCreateSpan(name, encodedParent, SpanKind.INTERNAL);
+  }
+
+  public static Span importAndCreateSpan(String name, String encodedParent,

Review Comment:
   minor: Would be nice to have a small test that asserts the kind is actually 
set, and that the old overload still defaults to `INTERNAL`.



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


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

Reply via email to