Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a general Logging service on Azure?

Maybe SO isn't the right place for this question. If there is a better platform, please let me know and I will post it there.

Within a single product/domain, we have multiple Azure-hosted applications. Some are Azure Functions, some are API's. Some are websites. Some use a common database. Some use their own custom database. But all somehow work together to form their own eco-system.

The problem we have is logging. Over time, each of these apps was created with their own logging system. We want to consolidate them all into a single system.

I am looking over all of the services that Azure has to offer for some kind of solution. We don't want a standard SQL database for this. We would like a service that is specifically made for logging, which would ideally have its own built-in query system. The idea is that we will create our own internal Logging API which can be called from every application. Then this api will store the logs.

At first, Azure Log Analytics Workspace seemed to be the obvious solution. But as I learn more about it, I'm not so sure. It seems to be more geared to going out and gathering records about machine performance, and less about letting some service (like our API) send log records to it. Am I correct about that? Or not?

Application Insights does a great job of this, but of course, each app has its own instance of Application Insights. And we want a single, consolidated repository for all logs for all applications

So my question is: Is there an out-of-the-box Azure service that is specifically designed for general-purpose logging?

I hope this is making sense.

like image 972
Casey Crookston Avatar asked Oct 23 '19 18:10

Casey Crookston


People also ask

What is Azure logging?

Azure Monitor Logs is a feature of Azure Monitor that collects and organizes log and performance data from monitored resources.

How do I enable Azure logging?

Enable application logging (Windows) To enable application logging for Windows apps in the Azure portal, navigate to your app and select App Service logs. Select On for either Application Logging (Filesystem) or Application Logging (Blob), or both.

How do I access Azure logs?

The Azure portal provides you with several options to access the log. For example, on the Azure Active Directory menu, you can open the log in the Monitoring section. Additionally, you can go directly to the audit logs using this link. You can also access the audit log through the Microsoft Graph API.


2 Answers

Azure Monitor is the service you're looking for.

enter image description here

If your apps are already instrumented using Application Insights, you can send custom events and metrics:

https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics

and lastly, you can query using Kusto queries:

https://learn.microsoft.com/en-us/azure/azure-monitor/log-query/log-query-overview

like image 62
Thiago Custodio Avatar answered Oct 16 '22 12:10

Thiago Custodio


A single Application Insights instance can be fed from different applications. You just have to use the same InstrumentationKey. The ApplicationInsight API allow this.

The built in reports will then not be of much use to you. You'll probably have to set up your own reports. But if you do that in a clever way and log custom properties for seperating the different applications I think you can build a great logging solution.

https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics

like image 1
rachri Avatar answered Oct 16 '22 12:10

rachri