Distributed Tracing for Entities #547
Open
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.
This PR adds additional information passing to enable distributed tracing for entities.
DurableOrchestrationClient.signal_entity
was modified to pass the current trace context in its HTTP headers (similar to how is done in thestart_new
call) such that the trace for signaling the entity created in WebJobs can correctly be linked as a child of the client trace that triggered the signal entity request.OperationResult
such that the traces can accurately capture the time it takes for the request to be completed (using theOperationResult.duration
field to calculate the end time).Note that for a client signaling an entity via
DurableOrchestrationClient.signal_entity
, in order for this method to be able to obtain the current trace context, the user needs to actually start their own trace from their function app. An example is provided in this PR for a client starting an orchestration (the example code would be identical in this case, withclient.start_new
replaced byclient.signal_entity
):Client Signaling an Entity
Which leads to the following trace

Orchestartion Calling/Signaling an Entity
Whereas starting the following orchestration
leads to the following trace
