0
votes

I'm struggling to get get my Azure App Service to send it's logs to Azure Log Analytics in Azure Monitor. It's an ASP.NET Core 3.1 web app hosted on Windows.

I have configured the "Disagnostics Settings (Preview)" blades options to have the category "AppServiceHTTPLogs" checked and to "Send to Log Analytics" with the relevant workspace selected. (As per this blog post https://azure.github.io/AppService/2019/11/01/App-Service-Integration-with-Azure-Monitor.html)

Once configured, I left it for 24 hours assuming that there could be some lag between setup and visibility of any logs. After waiting I have gone to the "Log Analytics Workspace" that was linked in the diagnostic settings, clicked the "Logs" blade and run a Kusto query for all "AppServiceHTTPLogs" in the last 24 hours. There are no results returned by the query.

I've read through many docs links (https://docs.microsoft.com/en-us/azure/azure-monitor/platform/diagnostic-settings and https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs) and other SO questions (Sending logs from .net core application running in App Service to log analytics) but none of them seem to provide anything that points me in the right direction.

Has anyone managed to get this successfully working? Are there any additional steps required to have this actually work? Are there any common mistakes people make when trying to set this up that I could have made?

1
I can repro the issue. After talking with support team, they can see the data in the database, but not in the UI in log analytics. I will update this thread when I get any feedback.Ivan Yang
Hello, I want to check if you can see the logs or not. Here is the feedback from the support team: 1. This feature is in preview. 2.If you cannot see the logs in log analytics, it's mainly due to the location of the location of azure web app, you can try put it in US or East asia. 3.I did follow the suggestion, and test it again, after 2 days(maybe less than 2 days, it's weekend here so I didn't check during that time), then this morning I can see the logs.Ivan Yang
Hello, I can't see the logs at all. I did know that this feature was in preview but I didn't find anywhere that said it was in preview only in US or East Asia. We are hosting in UK South so it could just be that. I only really asked the question so that the team would be able to fix whatever the issue is before they release it into GA. If it's not available in our region yet then that's fine. ThanksAdam Stapleton
Sorry for late response. No docs about this. I contacted the support team and got such info. Anyway, I will post an answer and hope it can notice others.Ivan Yang

1 Answers

1
votes

The feedback from the support team:

This feature is still in preview, and it does work in the regions of US and east asia(it may take some time to show the logs). For other regions, it may not work.

Hope this can help others who encountered this issue.