HDDS-14814. Unify Fragmented Traces for Freon randomkeys Command#9957
Open
sravani-revuri wants to merge 5 commits intoapache:masterfrom
Open
HDDS-14814. Unify Fragmented Traces for Freon randomkeys Command#9957sravani-revuri wants to merge 5 commits intoapache:masterfrom
sravani-revuri wants to merge 5 commits intoapache:masterfrom
Conversation
Contributor
Gargi-jais11
left a comment
There was a problem hiding this comment.
Thanks @sravani-revuri for the patch.
Left few comments.
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java
Outdated
Show resolved
Hide resolved
sumitagrawl
reviewed
Mar 24, 2026
Contributor
sumitagrawl
left a comment
There was a problem hiding this comment.
@sravani-revuri thanks for working over this, few comments given
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/freon/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/TracingUtil.java
Outdated
Show resolved
Hide resolved
Gargi-jais11
approved these changes
Mar 25, 2026
adoroszlai
reviewed
Mar 25, 2026
Contributor
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @sravani-revuri for the patch.
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/SpanSampler.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/tracing/SpanSampler.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/freon/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java
Show resolved
Hide resolved
hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/tracing/TestSpanSampling.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/tracing/TestSpanSampling.java
Outdated
Show resolved
Hide resolved
adoroszlai
reviewed
Mar 25, 2026
Contributor
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @sravani-revuri for updating the patch.
Comment on lines
+49
to
+51
| Method method = TracingUtil.class.getDeclaredMethod("parseSpanSamplingConfig", String.class); | ||
| method.setAccessible(true); | ||
| Map<String, LoopSampler> result = (Map<String, LoopSampler>) method.invoke(null, config); |
Contributor
There was a problem hiding this comment.
Sorry, I just noticed this. We should increase visibility of parseSpanSamplingConfig to package-private to avoid reflection in the test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Tracing for Freon randomkeys is currently fragmented and has the following issues:
Proposed Changes:
Proper handling of spans is required to ensure a chain of spans is created for the same trace.
Implement span level sampling through custom sampler and enable it through OTEL_SPAN_SAMPLING.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14814
How was this patch tested?
Manual Testing through Jaeger UI and unit tests.
Running Regular Freon Command
Command:
Output:
Running Span Sampling only
Command:
Output:
1 CreateVolume call:

2 CreateBucket calls:

1 CreateKey call:

Running Span Sampling with Trace Sampling
Command:
Output:
8 traces visible when command is run 16 times.
without sampling 180 spans are generated.