This guide will instruct you on how to install Application Insights (AI) for your cloud solution.
Before installing AI, set up an AI resource on Azure. Open your preferred browser, log in to the Azure Portal, and create 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.json
file and paste in your instrumentation key
found in the previous section.
The last step is to enable Application Insights in your application. You can achieve this by updating the Startup.cs
class.
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.
For more information, check out Microsoft's documentation on Application Insights