Configure Application Insights post deployment

Last updated Wednesday, August 22, 2018 in Sitecore Experience Platform for

Microsoft charges for Application Insights based on the amount of data that Application Insights collects. Depending on the topology and SKU size, Sitecore deploys environments with either a Basic or an Enterprise pricing plan.

To avoid unexpected bills and limit costs, Microsoft sets a configurable daily cap on the amount of data collected. If you reach that cap, the Application Insights service stops saving the telemetry data and Microsoft sends a warning email message so that you can extend it if necessary. Microsoft stores the collected data for 90 days before discarding it; therefore, it is useful to set up a continuous export to ensure the data persists.

Sitecore deployments that use either the Sitecore Azure toolkit or Azure Marketplace, including Managed Cloud and self-managed Azure customers, are set up with an Application Insights standard daily cap of 100GB per day. This is by default. Sitecore is configured by default to gather telemetry information, which it submits to Application Insights. The combination of these configurations means that, depending on use, the standard deployment can potentially reach the daily cap. Therefore, to lower costs, you can reduce the amount of data that Sitecore is logging or, to ensure Sitecore continues logging data, increase the daily cap.

This topic describes how to:

Reducing the Sitecore telemetry logging

You can use the Microsoft App Service Editor ®, (formerly Visual Studio Online (Monaco)), to reduce the amount that Sitecore logs for Application Insights on a counter-by-counter basis.

To use the Microsoft App Service to reduce or configure the performance counters being logged:

  1. Log in to the Azure portal with an account that has access to the subscription that hosts the app services where your Sitecore solution is deployed.
  2. In Microsoft Azure, All resources, Resources groups, click the relevant resource group to open the App Service for your Content Management role.

    Cloud_SitecoreAzureToolkit_OpenAnAppService_screenshot

  3. In the App Service menu, Development Tools, click App Service Editor.

    Picture 6

  4. In the App Service Editor, navigate to WWWROOT, App_Config, Include, zzz. Open the Sitecore.Cloud.ApplicationInsights.config file and scroll to the counterLoader section.

    Cloud_SitecoreAzureToolkit_CounterLoader_screenshot

  5. Edit the file and remove any <add category=”… entries for the performance counters that you no longer want to record in Application Insights. Alternatively, you can reduce the telemetry to the lowest possible throughput by removing all <add category=”… entries.
  6. Repeat steps 1 to 5 for the Content Delivery, Processing, and Reporting App Services roles.

Increasing the daily cap

To modify the Application Insights Daily Cap:

  1. Log in to the Azure portal with an account that has access to the subscription that hosts the app services where your Sitecore solution is deployed.
  2. In Microsoft Azure, All resources, click the relevant resource group to open the Application Insights resource.

    Cloud_SitecoreAzureToolkit_ResourcesGroup_screenshot

  3. In the Application Insights menu, under Configure, Usage and estimated costs, click Daily cap.

    Cloud_SitecoreAzureToolkit_DailyCaps_screenshot

  4. In the Daily volume cap dialog box, adjust the properties to match the Application Insights data volume requirements for your Sitecore Installation.
  5. Click OK, to apply the changes and close the form.

    Cloud_SitecoreAzureToolkit_DailyVolumeCap_screenshot

Note

The daily cap is set for the entire Application Insights service, regardless of the number of exporting nodes. The maximum daily limit that you can set is 1,000GB.

DataSampling_Cloud_SitecoreOnAzure_screenshot

To capture more errors in your data samples, go to the Data sampling drop down list and select All data (100%).

DataSampling100Percent_Cloud_SitecoreOnAzure_screenshot

Exporting logs continuously to a blob storage

If you must store data longer than the data retention period, it is a good idea to set up continuous export of your data to a blob storage account. This means that all the telemetry will be copied there and stored for as long as you need it.

Note

Continuous Export can incur additional charges, in addition to storage costs. Check Application Insights Pricing.

Using activity logs

An activity log describes what happens to resources in your subscription when someone is working with the Azure Platform. This. includes: who was working with the platform, what activities occurred, and when. You can also see the status of operations applied to services.

There are many different categories of activity logs:

  • Administrative - Contains a record of all create, update, delete, and action operations performed through Resource Manager. The Administrative category also includes any changes to role-based access control in a subscription.
  • Service Health - Contains a record of any service health incidents that occurred in Azure.
  • Alert - Contains a record of every time an Azure alert is activated. For example, if the %CPU time of a resource ran over 80%. You can create your own alert rules then receive notifications if they are activated.
  • Autoscale - Contains the record of any events related to the operation of the autoscale engine. This is based on any autoscale settings you defined in your subscription.
  • Recommendation - This category contains recommendation events from Azure Advisor.
  • Security - Contains a record of any alerts generated by the Azure Security Center.
  • Policy and Resource Health – These are reserved categories and currently do not contain any records.

Important

Similar to Application Insights, the data stored in Activity Logs is only kept for 90 days. If you want to access it for longer than 90 days, you can archive the Azure Activity Log.

Send feedback about the documentation to docsite@sitecore.net.