-
Notifications
You must be signed in to change notification settings - Fork 272
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
Add gRPC span and correlate client and orchestrator functions for DF .NET Isolated Distributed Tracing #2998
base: dev
Are you sure you want to change the base?
Conversation
@@ -154,8 +155,22 @@ public override Task<Empty> Hello(Empty request, ServerCallContext context) | |||
{ | |||
try | |||
{ | |||
ActivitySource activityTraceSource = new ActivitySource("DurableTask.WebJobs"); |
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.
For context, the source name is "DurableTask.WebJobs" because we load the DurableTelemetryModule
and it looks for sources that start with "DurableTask" (related code link). I'm working on updating the listeners to add a new one ("WebJobs.Extensions.DurableTask") when we initialize the module so we can remove this "DurableTask.WebJobs" that's just used to test for now.
Activity? currActivity = Activity.Current; | ||
if (options == null && options?.ParentTraceId == null && currActivity != null) | ||
{ | ||
options = new StartOrchestrationOptions(ParentTraceId: currActivity?.Id?.ToString()); | ||
} |
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.
I added the ParentTraceId
information to the StartOrchestrationOptions
, but I'm wondering if there's a better place to store this information since StartOrchestrationOptions
can be configured by the customer and we don't necessarily need customers to have access to ParentTraceId
.
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.
I'd like to avoid having a new activity source and span added. We should try and having the trace ID captured from the worker directly added to the enqueued orchestration. I think to accomplish this we will want to hydrate a shim activity which has its ID set to the trace context from the gRPC payload.
These changes help correlate client and orchestrator functions in DF .NET Isolated. It includes a new "gRPC start orchestration" span.
Gantt chart (shows HTTP trigger and orchestrator function in one trace)
Pull request checklist
pending_docs.md
release_notes.md
/src/Worker.Extensions.DurableTask/AssemblyInfo.cs