Skip to content

HDDS-14765. Improve Trace Hierarchy for Ozone Shell Put Key Command#9908

Open
sravani-revuri wants to merge 3 commits intoapache:masterfrom
sravani-revuri:HDDS-14765
Open

HDDS-14765. Improve Trace Hierarchy for Ozone Shell Put Key Command#9908
sravani-revuri wants to merge 3 commits intoapache:masterfrom
sravani-revuri:HDDS-14765

Conversation

@sravani-revuri
Copy link
Contributor

@sravani-revuri sravani-revuri commented Mar 11, 2026

What changes were proposed in this pull request?

The tracing for the put key command is currently fragmented. Instead of one continuous trace with multiple spans, each function call opens a new trace as a separate root.

Proposed Changes
The goal is to ensure all actions belong to the same trace using a parent-child hierarchy.
Modify TracingUtil to check for an existing trace context before creating a new span:

  • If a trace is already active, the new function call should join it as a span (child).
  • If no trace is active, it should start the initial trace (parent).

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-14765

How was this patch tested?

Tested with Jaeger UI using Docker.
image

@sravani-revuri
Copy link
Contributor Author

@sumitagrawl , could you please review these changes.

Copy link
Contributor

@Gargi-jais11 Gargi-jais11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sravani-revuri for the patch.
Please find inlined comments.

@Gargi-jais11
Copy link
Contributor

Gargi-jais11 commented Mar 12, 2026

@sravani-revuri Please add some tests in either TestTracingUtil or TestTraceAllMethod for checking.

  1. Call a method annotated with @SkipTracing and assert no span is created.
  2. Call a @SkipTracing method that throws and assert the exception is propagated unwrapped.
  3. Use createProxy with an interface that has @SkipTracing methods and assert they run correctly without creating spans.

Copy link

@yandrey321 yandrey321 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@Gargi-jais11 Gargi-jais11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sravani-revuri for updating the patch. Overall LGTM.

@adoroszlai
Copy link
Contributor

@Gargi-jais11 please quote Java annotations (@SkipTracing) to avoid mentioning unrelated GitHub users

@Gargi-jais11
Copy link
Contributor

@Gargi-jais11 please quote Java annotations (@SkipTracing) to avoid mentioning unrelated GitHub users

Thanks @adoroszlai, realised it just now when I checked it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants