This guide will instruct you on how to install Application Insights (AI) for your cloud solution.
The first thing to have in place when installing AI is an AI resource on Azure, so go ahead and open your favorite browser and log onto the Azure Portal and spin up a new AI Resource.
After that, you can go ahead and grab your
instrumentation key, from the AI Resource overview
The next thing we need to look at is how to enable AI for your Umbraco solution.
The easiest way is to open the command prompt of your choice and run the following command:
dotnet add package Microsoft.ApplicationInsights.AspNetCore
This will install Application Insights and all of its dependencies. Open the
appSettings.jsonfile and paste in your
instrumentation keyfound in the previous section.
The last step is to enable Application Insights in your application. You can achieve this by updating the
public void ConfigureServices(IServiceCollection services)
// The following line enables Application Insights telemetry collection.
Upload the changes to your solution and that is it.
Unless you have a dedicated Umbraco Cloud server, you are sharing resources with other Umbraco Cloud users. By default, Application Insights is configured to provide information about resources allocated and used by the system, however this can be a misrepresentation.