Repository navigation
HDDS-17581. Add TracingUtil span helpers and span-kind aware tracing proxies - #11852
Draft
rajeshkumarchandolu wants to merge 5 commits into
Draft
rajeshkumarchandolu wants to merge 5 commits into
rajeshkumarchandolu wants to merge 5 commits into
Conversation
rajeshkumarchandolu
force-pushed
the
tracing-common-span-helpers
branch
2 times, most recently
from
October 30, 2026 02:07
047a651 to
0cea7a6
Compare
Member
|
Hi @rajeshkumarchandolu Please raise PR with proper Jira and follow the guidline |
priyeshkaratha
marked this pull request as draft
October 30, 2026 05:04
rajeshkumarchandolu
force-pushed
the
tracing-common-span-helpers
branch
from
October 30, 2026 09:30
0cea7a6 to
7b4dd1d
Compare
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?
TraceAllMethodtakes aSpanKind, and@InternalSpanKindcan also be put on a delegate class.createProxy(delegate, itf, spanKind)names spans<delegate class>.<method>, for exampleKeyManagerImpl.listStatus. It works without a current span, so it can wrap components created at startup.createProxy(delegate, itf, conf)now creates INTERNAL spans. NewcreateClientProxycreates CLIENT spans. Existing RPC client proxies (SCM clients inHAUtils/HddsServerUtil, the OM client inRpcClient) switch to it, so their spans stay CLIENT.executeInSpanandOzoneProtocolMessageDispatcherrecord the exception and set the ERROR status with its message.createSpan,recordException,addAttributesToCurrentSpanandaddEventToCurrentSpando nothing when the current span isn't recording. NewSpanAttributeKeysholds shared attribute keys.TestSpanCollectorfor asserting on finished spans. Test tracer providers get a span processor, because with OpenTelemetry 1.67 a provider without one returns no-op spans.These changes are needed for the OM, SCM and datanode tracing work (HDDS-17586, HDDS-17593, HDDS-17594). That work will create internal service components as tracing proxies, so that every call to them gets its own span, and will add attributes and errors to spans from inside request handling. The current utilities can't do this: proxies can't wrap components created at startup, proxy spans are always CLIENT and named after the interface, and exceptions aren't recorded on spans. This PR adds only the common building blocks; it doesn't add new spans to any service.
There are no proto, RPC, configuration or storage changes. With tracing disabled and application-aware mode off, behaviour is unchanged.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17581
How was this patch tested?
hdds-commontracing package (79 tests) andTestOzoneProtocolMessageDispatcher.build-branchsucceeded on fork branchtracing-common-span-helpers(commit0cea7a688b): https://github.com/rajeshkumarchandolu/ozone/actions/runs/40989829194