-
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 TaskEventId to function traces #1386
Conversation
It mostly looks good to me, but I think there's an opportunity here to document some of the functionality that this PR interacts with. Please see my nitpicky comments above, and let me know if we can include those clarifications 😄 |
Thanks @davidmrdavid for the feedback! I've added more comments in my PR which will hopefully make things a bit less mysterious. This is a good reminder for me to get back into that habit. Let me know if the updated comments are helpful. I didn't go into too much detail on the mechanics of the middleware, though, because that would be pretty involved. However, it is modeled after the ASP.NET Core middleware design so I'm hoping that folks that are already familiar with ASP.NET Core will recognize the pattern I'm using with the context parameter and the |
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.
Suddenly, I understand the code much better! Thanks for the clarifications and this PR, LGTM.
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.
LGTM!
Resolves #1382.
With this PR, both our ETW traces and the Application Insight traces will have a new
TaskEventId
column for activity function executions. TheTaskEventId
integer value can be used to distinguish two different activity function executions that have the same name. For example, in theHelloSequence
example, you'd see that eachSayHello
execution has a differentTaskEventId
value (0, 1, and 2).For orchestrator and entity functions, this value will always be -1 since there isn't a way to associate a single event to a single orchestration function execution (there could be multiple events corresponding to a single execution).
We already have this data in the DurableTask-AzureStorage traces. This PR adds the same data to the WebJobs-Extensions-DurableTask traces (and to AppInsights).