-
Notifications
You must be signed in to change notification settings - Fork 12
Add new tracing properties for .NET E2E traces. #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add new tracing properties for .NET E2E traces. #44
Conversation
Thanks for the PR. I have a few questions about the problem being solved and whether we really need this PR.
I'd like to better understand why
It sounds like you're suggesting that we'd parent subsequent tasks to an activity's trace context. But TaskScheduled events should always be parented by the orchestration's trace context. I don't think there's a scenario where we need to save the trace context of an activity execution. Let me know if I'm misunderstanding.
The cases where DTFx would send an Feel free to schedule some time for us to discuss directly if more context-sharing is needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make sure we're on the same page regarding the requirements before merging.
Using the azure managed backend (i.e. Durable Task Scheduler) with .NET, in both the case of DTFx and Portable SDKs, the gRPC API is missing properties needed to generate spans for a complete orchestration execution. This change adds those missing properties.
The DTFx SDK expects the a (native)
ExecutionStartedEvent
to contain a parent trace context that exposes a tuple with the orchestration tracing activity <ID, span ID, start time>. This tuple is generated on initial execution of the orchestration, set on theExecutionStartedEvent
, and then expected to be passed back on subsequent executions. These properties enable the SDK to reuse a .NET tracingActivity
that represents then entire orchestration, even though they are, in fact, separate instances. The gRPCExecutionStarted
event today contains only theorchestrationSpanID
which, AFAIK, is not sufficient to duplicate a span.The gRPC
TaskScheduled
event given to workers contains aparentTraceContext
property which enables workers to parent traces related to task execution. However, the gRPCScheduleTaskAction
returned by the worker that generates subsequentTaskScheduled
events does not have a parent trace context property. This prevents tasks traces from being parented to orchestration-level traces.The gRPC API does not return the
ExecutionStarted
event to the backend (as in the case of DTFx). This means that event cannot be used to return orchestration-related tracing properties to the backend to be returned on subsequent executions. Instead, I propose those properties be returned via theOrchestratorResponse
object directly. The backend could then inject them into theExecutionStarted
event on subsequent execution in order to be consistent with and reuse properties used by DTFx. (Alternatively, those properties could be added toOrchestratorRequest
.)