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


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java:
##########
@@ -71,6 +75,13 @@ public final class TracingUtil {
   private TracingUtil() {
   }
 
+  /** OTel no-op span with a valid, non-sampled context: nested and remote 
spans inherit "not sampled". */
+  private static Span nonSampledSpan() {
+    IdGenerator ids = IdGenerator.random();

Review Comment:
   we can define a member which needs to be initialized once or during 
reconfigure



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogImpl.java:
##########
@@ -553,4 +561,14 @@ public void onMessage(
       }
     }
   }
+
+  private void addTransactionsWithTracing(ArrayList<DeletedBlocksTransaction> 
txs,
+      long firstTxID, long lastTxID, int txCount) throws IOException {
+    TracingUtil.executeInNewSpan("DeletedBlockLog.addTransactions", () -> {

Review Comment:
   we need not execute in another span, can use span in Threadlocal currently 
if available



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyDeletingService.java:
##########
@@ -138,6 +138,16 @@ public AtomicLong getDeletedKeyCount() {
   Pair<Pair<Integer, Long>, Boolean> processKeyDeletes(Map<String, PurgedKey> 
keyBlocksList,
       Map<String, RepeatedOmKeyInfo> keysToModify, List<String> renameEntries,
       String snapTableKey, UUID expectedPreviousSnapshotId) throws IOException 
{
+    return TracingUtil.executeInternalSpan("KeyDeletingService", () -> {

Review Comment:
   we can start span in call() method, and avoid startSpan for attributes



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