Where do those lovely trace statements that you write in your Azure Functions go?
How do you access them?
With some recent changes in logging in Azure, you can access all this information via Application Insights directly from your Azure Function. When you access your function, underneath the “Configured features” sections you will see an option called “Application Insights.”
Clicking on this link will then bring you to a dashboard of real-time metrics that you might be spooling from your service. However, for today, what we are interested in are the log files that are available from the top of the toolbar menu called “Logs”.
When you click on Logs you are then presented with a screen that looks very similar to a SQL Server Query Window. If your functions have already logged some information to the storage container you’ll see some of the information below. From there it is a simple matter of using the fields on the left and writing queries in the top pane to access your data. You can even store previously used queries as favourites so you don’t need to cut and paste them again multiple times.
I haven’t played with all the features yet, but being able to get my log information out in such a simplistic manner makes troubleshooting and accessing the data much easier than it ever was on any server.