Manage application performance
Optimizely Digital Experience Platform (DXP) uses Microsoft's Application Insights to manage application performance and monitor Web Apps.
Application Insights lets you troubleshoot performance issues and exceptions in the Web App. See Create an Optimizely Cloud Account to request access to Application Insights for your environment. To learn how to use this tool, see Microsoft's Application Insights for ASP.NET Core applications.
Note
Application Insights is configured automatically for all sites in the DXP from the EPiServer.CloudPlatform.Cms package.
Application Insight API key
- The API Key has list and read-only permissions.
- You get only one key per requested environment; if you request keys for Integration, Preproduction, and Production environments, you will get three keys.
- The previous key is overwritten if you need a new key.
Customers and partners can request an Application Insights API key for environments from [email protected].
Single Page Application configuration
Set up usage tracking parameters to ensure the website traffic volume monitoring is correct. For websites using the Single Page Application (SPA), you need to specifically configure the page view tracking because pages on these websites do not reload during usage. See Consumption metrics for instructions on configuring page view tracking for SPAs.
Logging
The ILogger automatically logs to Application Insights. By default, only Warning logs and more severe logs are automatically captured. To change this behavior, override the logging configuration for the provider ApplicationInsights
as shown below. The following configuration allows ApplicationInsights
to capture Information logs and more severe logs.
{
"Logging": {
"LogLevel": {
"Default": "Warning"
},
"ApplicationInsights": {
"LogLevel": {
"Default": "Information"
}
}
}
}
Source maps
When troubleshooting client-side errors, stack traces show the optimized version of the exceptions. Source maps can be added to the code package to show readable stack traces. In the code package, any *.js.map
file maps the optimized JavaScript to the readable version. This mapping is done automatically with each deployment.
JavaScript path structure is: /src/main.js
. The source maps next to this file: /src/main.js.map
. Deployment overwrites the source map, leaving only the last version available.
The path to the source map in the code package must correspond to the path JavaScript serves the browser.
Source map versioning
Source map versioning is supported when JavaScript and the source map are in a version folder. For example: /dist/v1.5.0/main.js
uses the source map /dist/v1.5.0/main.js.map
, and other versions of the source map can then still be used when investigating exceptions that happened in a previous version.
Updated 8 months ago