Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Function V2 exception logs missing stack trace

I have a V2 Function deployed which has an unhandled exception. I would expect (and think it was in V1) to see the stack trace and line number in the error log but instead all I get is:

System.Private.CoreLib: Exception while executing function: MyFunction. MyProjectNameToCall: Object reference not set to an instance of an object.

Is there some configuration I need to set to be able to see this?

Thanks

like image 885
ADringer Avatar asked Jun 18 '18 14:06

ADringer


1 Answers

Realised my mistake. The logging in the monitor section of the Functions only displays trace information and when I was looking in Application Insights I was only looking at traces.

If I view 'exceptions' (seems quite obvious now!) in Application Insights then I can see the stack trace and line numbers.

like image 114
ADringer Avatar answered Oct 29 '22 18:10

ADringer