[#16670] dist-trace: propagate traceparent to the PG backend via the startup packet - #19
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-07-server-init
branch
from
July 11, 2026 02:15
fbd44a0 to
d24a28c
Compare
ellabaron-code
force-pushed
the
dist-trace-08-startup-packet
branch
from
July 11, 2026 02:15
a2f5f67 to
aad023c
Compare
ellabaron-code
force-pushed
the
dist-trace-07-server-init
branch
from
July 13, 2026 15:14
d24a28c to
ffc1420
Compare
ellabaron-code
force-pushed
the
dist-trace-08-startup-packet
branch
from
July 13, 2026 15:14
aad023c to
46519a8
Compare
ellabaron-code
force-pushed
the
dist-trace-07-server-init
branch
from
July 13, 2026 16:12
ffc1420 to
0a4d830
Compare
ellabaron-code
force-pushed
the
dist-trace-08-startup-packet
branch
from
July 13, 2026 16:12
46519a8 to
e2d1727
Compare
…acket Carry a W3C traceparent from the tserver into the PG backend over the connection startup packet, so the backend's init (and subsequent queries) root under the originating trace. The tserver-side connection already has an active trace context; this threads it to the backend. libpq client (fe-connect.c, fe-protocol3.c, libpq-int.h): - new yb_dist_traceparent conninfo option on pg_conn, freed with the conn, emitted as a startup-packet option when set. libpq_utils (.cc/.h): - PGConnSettings gains a traceparent field; BuildConnectionString appends yb_dist_traceparent; internal connections populate it from dist_trace::GetActiveTraceparent(). backend (postmaster.c, postinit.c, libpq-be.h): - postmaster parses the yb_dist_traceparent startup param into Port::yb_dist_traceparent; - InitPostgres turns it into the pre-existing yb_dist_tracecontext GUC (traceparent='...') so backend init activates that root span.
ellabaron-code
force-pushed
the
dist-trace-08-startup-packet
branch
from
July 13, 2026 22:25
e2d1727 to
7ebbd01
Compare
ellabaron-code
force-pushed
the
dist-trace-07-server-init
branch
from
July 13, 2026 22:25
0a4d830 to
7d22120
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 a W3C traceparent from the tserver into the PG backend over the
connection startup packet, so the backend's init (and subsequent queries)
root under the originating trace. The tserver-side connection already has
an active trace context; this threads it to the backend.
libpq client (fe-connect.c, fe-protocol3.c, libpq-int.h):
emitted as a startup-packet option when set.
libpq_utils (.cc/.h):
yb_dist_traceparent; internal connections populate it from
dist_trace::GetActiveTraceparent().
backend (postmaster.c, postinit.c, libpq-be.h):
Port::yb_dist_traceparent;
(traceparent='...') so backend init activates that root span.