Web App Application Logs not being sent to Log Analytics

AdamCollins-2199 1 Reputation point
2022-12-28T06:12:47.753+00:00

I am running a ASP.NET V4.8 web app using a Azure Web Apps instance.

I am currently logging to a container blob using System.Diagnostics.Trace where the logs are stored in a CSV format but would like to be able to query logs and possibly set up alerts.

To do achieve this I have been following this guide here and created Diagnostics Settings in the App Service and a new Log Analytics Workspace. When triggering a call to Diagnostics.Trace.TraceError() I am able to see the error show up in the Log Stream and in the blob container. However in my Log Analytics Workspace when querying AppServiceAppLogs(and any other possible tables) I receive "No results found from the last 24 hours".

This is the same behaviour when I query logs from App Service > Monitoring > Logs

Any help would be greatly appreciated.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,662 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,971 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 21,551 Reputation points Moderator
    2023-01-12T04:53:55.4466667+00:00

    @AdamCollins-2199 , can you please run the query below in logs to see if any data is getting into the Application Insights (Logs are generally available in "traces" / "AppTraces" table) -

    union *  
    

    Depending on the output of the query, there could be 2 possibilities: -
    1. None of the telemetry information is getting into Application Insights - in this case, please ensure that the Application Insights is enabled. There are 2 methods to enable it

    Depending on the method chosen, you could also check the "Troubleshooting Guides" available in these links for troubleshooting purpose

    2. Some data is getting to AppInsights - In this case, please see the following

    Hope this helps. Please let me know if you have any questions.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.