Maninder
Maninder

Reputation: 1261

Can we use application insights for centralized logging?

We are having multiple applications deployed in Azure cloud and we are using LogEntriesLog4net appender for sending logs to a common place.

We are looking to utilize App Insights Microsoft.ApplicationInsights.Log4NetAppender for logging.

Is it possible to send all logs to a common App Insights resource or needs to be there with all applications?

How can we distinguish which log came up from which applications, do want to mix up all logs at one place?

We have an existing application and have several log statements scattered throughout the application.That is the reason we chose Log4Net appender for application insights.

Upvotes: 2

Views: 1782

Answers (2)

Alex Bulankou
Alex Bulankou

Reputation: 2456

Is it possible to send all logs to a common App Insights resource or needs to be there with all applications?

Definitely possible, but only recommended if you can benefit from viewing these logs in one place. Like in this example referenced by earlier answer, we are talking about multiple stamps of the same application.

How can we distinguish which log came up from which applications, do want to mix up all logs at one place?

Typically you want to add your custom dimension denoting application instance and initialize all telemetry with a value of this property; and telemetry initializer is the best way of doing it.

Upvotes: 2

Alex Belotserkovskiy
Alex Belotserkovskiy

Reputation: 4062

You can. We are using one Application Insights account for two web apps and a few of mobile apps - Windows Phone and Android. But the mobile apps, for example, are better with HockeyApp (and, actually, it is now recommended, if you have mobile apps). That leaves us with other types of apps, and AppInsights has such functionality to divide the telemetry - here is the reference. Once in AI, telemetry will be tagged or used its own environment.

I believe that is the way to implement what you would want to implement.

Upvotes: 0

Related Questions