[#16670] dist-trace: propagate trace context over the PG<->tserver shared memory exchange - #17
Open
ellabaron-code wants to merge 1 commit into
Open
Conversation
Author
|
Misfiled: reopening against yugabyte/yugabyte-db. |
ellabaron-code
force-pushed
the
dist-trace-06-shmem-propagation
branch
from
July 11, 2026 02:15
7090413 to
bc5dd86
Compare
ellabaron-code
force-pushed
the
dist-trace-05-task-scope-carry
branch
from
July 11, 2026 02:15
7ae5483 to
43f7c29
Compare
ellabaron-code
force-pushed
the
dist-trace-05-task-scope-carry
branch
from
July 13, 2026 15:13
43f7c29 to
05cb556
Compare
ellabaron-code
force-pushed
the
dist-trace-06-shmem-propagation
branch
from
July 13, 2026 15:14
bc5dd86 to
d684020
Compare
ellabaron-code
force-pushed
the
dist-trace-05-task-scope-carry
branch
from
July 13, 2026 16:12
05cb556 to
45dee2c
Compare
ellabaron-code
force-pushed
the
dist-trace-06-shmem-propagation
branch
from
July 13, 2026 16:12
d684020 to
17de952
Compare
…ry exchange Carry the distributed-trace parent across the shared-memory Perform / AcquireObjectLock fast path, mirroring what the RPC header path already does. The read-side codec (rpc::ToSpanContext) shipped earlier; this adds the write side and wires both ends of the exchange. - ash/rpc_wait_state: TraceContextSerializer encodes the active span's SpanContext as a standalone length-prefixed TraceContextPB blob (always emits the length prefix, zero when unset, so the framing stays parseable). Big-endian layout matches what rpc::ToSpanContext reads back. - pggate/pg_client (PrepareAndSend): start the outbound shared-memory span, serialize the trace_context blob into the exchange buffer after the ASH metadata, size the obtain accordingly, and end the span on the early-exit path so it is not leaked. - tserver/pg_client_session: parse the trace_context blob out of the exchange, and when present start a server span (StartServerSpanWithScope) as a child of the propagated context, with rpc.system=inbound_shmem and matching service/method attributes; set Ok/Error status around the handler.
ellabaron-code
force-pushed
the
dist-trace-05-task-scope-carry
branch
from
July 13, 2026 22:25
45dee2c to
9830d01
Compare
ellabaron-code
force-pushed
the
dist-trace-06-shmem-propagation
branch
from
July 13, 2026 22:25
17de952 to
54c48c6
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.
Carry the distributed-trace parent across the shared-memory Perform /
AcquireObjectLock fast path, mirroring what the RPC header path already
does. The read-side codec (rpc::ToSpanContext) shipped earlier; this adds
the write side and wires both ends of the exchange.
SpanContext as a standalone length-prefixed TraceContextPB blob (always
emits the length prefix, zero when unset, so the framing stays
parseable). Big-endian layout matches what rpc::ToSpanContext reads back.
serialize the trace_context blob into the exchange buffer after the ASH
metadata, size the obtain accordingly, and end the span on the early-exit
path so it is not leaked.
exchange, and when present start a server span (StartServerSpanWithScope)
as a child of the propagated context, with rpc.system=inbound_shmem and
matching service/method attributes; set Ok/Error status around the
handler.