[#16670] dist-trace: carry trace context across task and Raft-apply thread hops - #16
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-05-task-scope-carry
branch
from
July 11, 2026 02:15
7ae5483 to
43f7c29
Compare
ellabaron-code
force-pushed
the
dist-trace-04-rpc-propagation
branch
from
July 11, 2026 02:15
98034dc to
26c89ff
Compare
ellabaron-code
force-pushed
the
dist-trace-04-rpc-propagation
branch
from
July 13, 2026 15:13
26c89ff to
ee1cfe9
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-04-rpc-propagation
branch
from
July 13, 2026 16:12
ee1cfe9 to
bc72233
Compare
ellabaron-code
force-pushed
the
dist-trace-05-task-scope-carry
branch
from
July 13, 2026 16:12
05cb556 to
45dee2c
Compare
Same capture/re-activate pattern as the async scope-carry infra, applied to the higher-level task types whose work runs on a different thread than the one that triggered it. Each snapshots dist_trace::GetActiveSpanContext() where the scope is still live and re-establishes it with ActivateParentScope around the deferred run, so the work's RPCs nest under the triggering trace. - tablet/operation_driver: OperationDriver captures at construction, re-activates in ApplyTask (APPLYING/APPLIED UpdateTransaction RPCs on the Raft apply thread). - master/async_rpc_tasks_base: RetryingRpcTask captures at construction, re-activates at the top of Run(). - master/multi_step_monitored_task: captures at construction, re-activates in RunInternal before each step. - tserver/tablet_validator: captures per scheduled index (carried from the CreateTablet RPC into OpenTablet), re-activates the first batched index's context around the GetBackfillStatus poll. Purely additive; all no-ops when the captured context is invalid.
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-04-rpc-propagation
branch
from
July 13, 2026 22:25
bc72233 to
410d809
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.
Same capture/re-activate pattern as the async scope-carry infra, applied
to the higher-level task types whose work runs on a different thread than
the one that triggered it. Each snapshots dist_trace::GetActiveSpanContext()
where the scope is still live and re-establishes it with ActivateParentScope
around the deferred run, so the work's RPCs nest under the triggering trace.
re-activates in ApplyTask (APPLYING/APPLIED UpdateTransaction RPCs on
the Raft apply thread).
re-activates at the top of Run().
in RunInternal before each step.
CreateTablet RPC into OpenTablet), re-activates the first batched index's
context around the GetBackfillStatus poll.
Purely additive; all no-ops when the captured context is invalid.