The AppServiceConsoleLogs query Issue in Azure Monitor

Kadriye Taylan
KoçSistem
Published in
2 min readOct 21, 2022

--

Hi everyone,

In this article, I will tell you about a problem we have with the monitoring solution we use for Web App Container from Azure Services and the solution of Microsoft.

What is the issue?

We have a java application that runs as a Web App Container. The logs of this application are kept in the database. It is also shown in Azure Monitor as container log.

Since the application keeps more than 300 payment transactions during the day, the logs were very critical and it was necessary to view them on Azure Monitor during the day. However, the number of logs received in Azure monitor and the number in the database did not match.

Summary

The AppServiceConsoleLogs query in Azure Monitor was not displaying all records rendered by the Web App mywebapp Application Logs.

What is the reason of issue?

In order to provide real time logs, the platform streams the Docker logs from the Web App container. When configuring the container, the size of the log file that is used internally by Docker can have several values. On App Service Linux the default size was 1MB, however, the application was found to have individual log lines that were larger than 1MB.

What is the solution?

All current instances from the mywebapp Web App were patched to use 25MB for the Docker max-size file limit. Microsoft have applied a global platform change as well to increase the default for this setting (5MB) and added a new App Setting to override this value for individual Web Apps. In order to take advantage of this new feature, as Microsoft recommended, you can add the following App Settings. Also, it will be available with the platform update in all regions by the first week of November.

WEBSITE_CONTAINER_LOG_MAX_FILE_SIZE=25m

We would like to thank Microsft team for all their support during this process.

We would also like to thank Nevin Cansel Efendioglu for identifying the problem and following it carefully at the beginning of the process. :)

I hope it was an useful article. Have a nice day everybody :) Stay healthy!

--

--

Kadriye Taylan
KoçSistem

DevOps Engineer at Vanderlande - Eindhoven, NL