Closed jarvan-jiang closed 1 month ago
Hi @jarvan-jiang - can you please clarify your question? A concrete example of what you're looking to save would help me understand. Thanks
Hi @jarvan-jiang - can you please clarify your question? A concrete example of what you're looking to save would help me understand. Thanks
Hi @davidmrdavid , sorry make you confusion, let me try to explain more.
What I mean is, when I throw TaskFailureException
in an Activity, the first parameter reason
of TaskFailureException
will be stored in Payloads
table, which is nice. However, the rest like innerException
and details
are not saved.
public TaskFailureException(string reason, Exception innerException, string details)
: base(reason, innerException)
{
Details = details;
}
Is there is a way to save more info like stacktrace or detailed exception from the rest parameters than reason? Or I have to manually put all the info into reason?
Thanks @jarvan-jiang.
I did a bit triage here, the answer is not immediately obvious to me, but I wanted to document some findings here.
First - the Payload
table schema is specified here:
There I can see a Text
field that I expect may serve as a "catch all" to serialize all sorts of information. This your exception details would probably go, I think.
I also see that when we read from the database, we do try to read the failure details, at least if the if-statement branch in the snippet below is taken:
and I see that if-statement branch is taken if the Payload
column contains a JSON:
This was implemented here: https://github.com/microsoft/durabletask-mssql/pull/188
So this brings me to a few questions:
(1) What package and version of DurableTask MSSQL are you using? Please list the package name (there's multiple, depending on whether you're running DTFx directly, or running Durable Functions / serverless) and the version?
(2) Do you see anything in the Payload column for your task failures?
(3) Looking at the aformentioned PR, there should be a new configuration called ErrorPropagationMode.UseFailureDetails
which should serialize these extra details. Is that something you've set or can try setting? If you can try setting it and reproduce with it, that would help us proceed further.
I also see a report here that the new failure mode may have some edge cases when sub-orchestrators and their activities are involved. Please take a look and let me know if this matches your symptoms. Thanks!
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Right now if a TaskFailedException is thrown in execution of Activity, the reason can be saved into payload. But how to save the other information like exception detail into payload text too?