Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Application Insights as an Azure App Service Extension or via NuGet?

It's possible to install Application Insights via the extensions section in Azure App Services, but it's also possible to just install the packages via NuGet and define the APPINSIGHTS_INSTRUMENTATIONKEY application setting. You can also do both.

What is the difference?

Edit:

I have found what the differences are between installing the extension or the NuGet packages:

You can configure monitoring by instrumenting the app in either of two ways:

Run-time - You can select a performance monitoring extension when your web app is already live. It isn't necessary to rebuild or re-install your app. You get a standard set of packages that monitor response times, success rates, exceptions, dependencies, and so on.

Build time - You can install a package in your app in development. This option is more versatile. In addition to the same standard packages, you can write code to customize the telemetry or to send your own telemetry. You can log specific activities or record events according to the semantics of your app domain.

Source: https://docs.microsoft.com/en-us/azure/application-insights/app-insights-azure-web-apps#run-time-or-build-time

But what if you do both? Will there be anything beneficial about it?

like image 700
Tom Avatar asked Mar 20 '18 13:03

Tom


1 Answers

But what if you do both? Will there be anything beneficial about it?

  • The extension detects that your app has already brought Application Insights with it and won't do anything, except dropping a profiler, which helps collect full SQL Statement in Dependencies. Without the profiler full SQL Statement won't be collected but everything else should just work fine. (If you are using 2.3.0 or earlier of SDK or if you application is targeting old .NET Framework like 4.0, then profiler does better correlation of dependencies as well.

In short, Starting with 2.4.0 of SDK, the only advantage of installing extension on top on nuget installation is to get full SQL Statements in Dependency Telemetry.

like image 65
cijothomas Avatar answered Sep 29 '22 09:09

cijothomas