Add parentTraceContext to entity operation proto messages#64
Open
Add parentTraceContext to entity operation proto messages#64
Conversation
Entity operations triggered from orchestrations don't currently propagate distributed trace context because SendEntityMessageAction lacks a parentTraceContext field. This is unlike ScheduleTaskAction and CreateSubOrchestrationAction, which already have this field. Add parentTraceContext to SendEntityMessageAction so that entity operations can be linked to the trace of the calling orchestration. Fixes microsoft/durabletask-dotnet#653
cgillum
added a commit
to microsoft/durabletask-dotnet
that referenced
this pull request
Mar 1, 2026
Entity operations triggered from orchestrations don't propagate distributed trace context because SendEntityMessageAction lacks a parentTraceContext field. This causes entity operations to appear disconnected from their parent orchestration traces. Changes: - Vendor updated proto with parentTraceContext field on SendEntityMessageAction (see microsoft/durabletask-protobuf#64) - Set ParentTraceContext in ProtoUtils.ConstructOrchestratorResponse for entity message actions (matching existing behavior for tasks and sub-orchestrations) - Add unit tests for entity trace context propagation Note: A corresponding server-side change is also needed in the Durable Task Scheduler backend to propagate SendEntityMessageAction.ParentTraceContext to OperationRequest.traceContext on entity work items. Fixes #653
These fields allow the DTS backend to propagate trace context from SendEntityMessageAction through to entity operation events, completing the trace context chain for entity operations.
andystaples
approved these changes
Mar 3, 2026
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.
Summary
Entity operations triggered from orchestrations don't currently propagate distributed trace context because the relevant proto messages lack
parentTraceContextfields.Changes
TraceContext parentTraceContext = 5toSendEntityMessageAction— allows the SDK to attach trace context when sending entity operations from orchestrationsTraceContext parentTraceContext = 6toEntityOperationSignaledEvent— allows backends to propagate trace context through signaled entity operationsTraceContext parentTraceContext = 8toEntityOperationCalledEvent— allows backends to propagate trace context through called entity operationsThese additions bring entity operations to parity with
ScheduleTaskAction/TaskScheduledEventandCreateSubOrchestrationAction/SubOrchestrationInstanceCreatedEvent, which already haveparentTraceContextfields.Related
Fixes microsoft/durabletask-dotnet#653