[#16670] dist-trace: span/scope API and its direct callers#13
Open
ellabaron-code wants to merge 1 commit into
Open
[#16670] dist-trace: span/scope API and its direct callers#13ellabaron-code wants to merge 1 commit into
ellabaron-code wants to merge 1 commit into
Conversation
Author
|
Misfiled: reopening against yugabyte/yugabyte-db. |
ellabaron-code
force-pushed
the
dist-trace-02-distlib
branch
from
July 11, 2026 02:15
bd290ce to
28f5f4f
Compare
ellabaron-code
force-pushed
the
dist-trace-01-proto
branch
from
July 13, 2026 14:55
8c92dd5 to
d8482be
Compare
ellabaron-code
force-pushed
the
dist-trace-02-distlib
branch
from
July 13, 2026 15:13
28f5f4f to
24f800a
Compare
Rework the dist_trace library into the span+scope API the rest of the stack
builds on, and update every in-tree caller of the changed API in lockstep so the
tree keeps building:
- SpanWithScope (a span bundled with an activated thread-local scope), plus
Start{Client,Server}SpanWithScope and ActivateParentScope.
- GetActiveSpanContext / GetActiveTraceparent for cross-boundary propagation.
- InitDistTrace now takes a service name; CleanupDistTrace -> ShutdownDistTrace
(mirrored in ybc_dist_trace and its pg_yb_utils.c caller).
- Replace the RpcSpanAttrs pending-attr buffer with a plain string-pair vector
drained internally by StartClientSpanWithScope; drop the now-unused public
GetPendingRpcAttrPairs/ClearPendingRpcAttrs.
Callers updated:
- outbound_call: client span via StartClientSpanWithScope, write trace_context
into the RPC RequestHeader, restore the parent around the completion callback.
- pg_client / pg_session: shared-memory client span and pending RPC attributes.
- dist_trace-test: new InitDistTrace signature and ShutdownDistTrace rename.
The shared-memory trace_context propagation itself (PgClient::PrepareAndSend)
lands in a later PR.
ellabaron-code
force-pushed
the
dist-trace-01-proto
branch
from
July 13, 2026 16:11
d8482be to
b0a2761
Compare
ellabaron-code
force-pushed
the
dist-trace-02-distlib
branch
from
July 13, 2026 16:12
24f800a to
77539c4
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.
Rework the dist_trace library into the span+scope API the rest of the stack
builds on, and update every in-tree caller of the changed API in lockstep so the
tree keeps building:
Start{Client,Server}SpanWithScope and ActivateParentScope.
(mirrored in ybc_dist_trace and its pg_yb_utils.c caller).
drained internally by StartClientSpanWithScope; drop the now-unused public
GetPendingRpcAttrPairs/ClearPendingRpcAttrs.
Callers updated:
into the RPC RequestHeader, restore the parent around the completion callback.
The shared-memory trace_context propagation itself (PgClient::PrepareAndSend)
lands in a later PR.