sravani-revuri opened a new pull request, #9957:
URL: https://github.com/apache/ozone/pull/9957

   ## What changes were proposed in this pull request?
   Tracing for Freon randomkeys is currently fragmented and has the following 
issues:
   - Instead of a single trace for a command execution, multiple traces are 
being created. Therefore breaking the parent-child hierarchy.
   - The root span doesnt contain command name as it appears for ozone sh 
commands.
   - A single freon rk command creates multiple repetitive spans.
   
   **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:**
   ```
   ozone freon rk --numOfVolumes=1 --numOfBuckets=1 --numOfKeys=3 
   OTEL_SPAN_SAMPLING=""
   ```
   
   #### **Output:**
   <img width="1080" height="700" alt="image" 
src="https://github.com/user-attachments/assets/a16e7207-9e28-4ad9-b303-a25b75a67a19";
 />
   
   ### **Running Span Sampling only**
   #### **Command:**
   ```
   ozone freon rk --numOfVolumes=1 --numOfBuckets=4 --numOfKeys=2
   OTEL_SPAN_SAMPLING=createVolume:1,createBucket:2,createKey:5
   ```
   #### **Output:**
   1 CreateVolume call: 
   <img width="500" height="500" alt="image" 
src="https://github.com/user-attachments/assets/b8e83b23-e3e2-4afc-b3a3-025dbdd878dc";
 />
   
   2 CreateBucket calls: 
   <img width="500" height="500" alt="image" 
src="https://github.com/user-attachments/assets/7fe831b2-dd9e-46ae-99a5-8963c7d3c489";
 />
   
   1 CreateKey call:
   <img width="500" height="500" alt="image" 
src="https://github.com/user-attachments/assets/e82d2999-3c3f-4937-9e0e-e5549ed4fcfb";
 />
   
   ### **Running Span Sampling with Trace Sampling**
   #### **Command:**
   ```
   ozone freon rk --numOfVolumes=1 --numOfBuckets=1 --numOfKeys=10 
   OTEL_TRACES_SAMPLER_ARG=0.5
   OTEL_SPAN_SAMPLING=createVolume:1,createBucket:1,createKey:5
   ```
   #### **Output:**
   
   8 traces visible when command is run 16 times.
   
   <img width="500" height="500" alt="image" 
src="https://github.com/user-attachments/assets/46d2c5b5-6d75-40e9-be9b-dcd88de14f8b";
 />
   
   without sampling 180 spans are generated.
   
   <img width="500" height="141" alt="image" 
src="https://github.com/user-attachments/assets/9cf26cd1-f41d-4fdd-8cc4-c09adf13a37f";
 />
   
   
   


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