Reputation: 1753
I am playing with Azure function and would like to get some more insight in how to get more detailed error message.
Function gets input from queue, which means there will be number of instances of the function running in parallel. The function does some processing and want to output into table storage by using ICollector<>
The functions quite frequently fails with exception
Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception while executing function: Functions.LoadActivityDetail
---> System.InvalidOperationException : Error while handling parameter outputTable after function returned:
---> Microsoft.WindowsAzure.Storage.StorageException : Element 0 in the batch returned an unexpected response code.
I can get this exception from log but I would like to get some more details as mentioned e.g. “Unexpected Response Code for Operation: 0” when executing Azure Table Storage batch delete.
The problem is that I cannot catch the exception in code as the binding is done azure functions runtime.
Is there a way how to enable some more detailed logging?
Upvotes: 2
Views: 1994
Reputation: 12538
Could you please enable Application Insights? This would give you more detailed information about those failures.
You can find information on how to enable Application Insights for your Function App here.
In addition, looking at your storage account logs may provide helpful information about what might be causing the failure.
I'm also creating this issue to track an enhancement: https://github.com/Azure/azure-webjobs-sdk/issues/1300
Upvotes: 3