sumitagrawl commented on code in PR #12145:
URL: https://github.com/apache/ozone/pull/12145#discussion_r4706228776


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java:
##########
@@ -586,20 +590,20 @@ public static Span createSpan(String spanName, SpanKind 
spanKind) {
     return buildSpan(spanName, spanKind);
   }
 
-  public static void recordExceptionInCurrentSpan(Throwable t) {
-    recordException(Span.current(), t);
+  public static void recordErrorInCurrentSpan(Throwable t) {
+    recordError(Span.current(), t);
   }
 
-  public static void recordException(Span span, Throwable t) {
-    if (t == null || !span.isRecording()) {
+  public static void recordError(Span span, Throwable t) {
+    if (!span.isRecording()) {
       return;
     }
-    span.recordException(t);
-    if (t.getMessage() == null) {
+    if (t == null) {
       span.setStatus(StatusCode.ERROR);
-    } else {
-      span.setStatus(StatusCode.ERROR, t.getMessage());
+      return;
     }
+    span.recordException(t);
+    span.setStatus(StatusCode.ERROR, t.getMessage());

Review Comment:
   need to add check, t.getMessage() == null as earlier



##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/util/AuditUtils.java:
##########
@@ -21,13 +21,19 @@
 
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
 import javax.ws.rs.container.ContainerRequestContext;
 
 /**
  * Common utilities for operation auditing purposes.
  */
 public final class AuditUtils {
+
+  private static final Set<String> CREDENTIAL_QUERY_PARAMETERS = Set.of(

Review Comment:
   how this change related to this PR ?



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineManagerImpl.java:
##########
@@ -221,9 +224,10 @@ public Pipeline createPipeline(ReplicationConfig 
replicationConfig,
       throws IOException {
     checkIfPipelineCreationIsAllowed(replicationConfig);
 
-    acquireWriteLock();
+    TracingUtil.executeInNewSpan("PipelineManagerImpl.acquireWriteLock", () -> 
acquireWriteLock());

Review Comment:
   we must not have acquireWriteLock() in trace, else you need a all places, 
this is un-necessasry.



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