We recommend creating an Application Insights resource to monitor your e-commerce solution. With Application Insights, you have full observability into your application across all components and dependencies of your complex distributed architecture. It includes powerful analytics tools to help you diagnose issues and to understand what users actually do with your app. It’s designed to help you continuously improve performance and usability.
It works for apps hosted on-premises, hybrid, or any public cloud.
- From the Azure portal, create a new Application Insights resource (or use an existing one).
Open Application Insights resource you just created.
Copy Instrumentation Key
APPINSIGHTS_INSTRUMENTATIONKEYenvironment variable with Instrumentation Key value. How to Configure apps in the portal - Azure App Service | Microsoft Docs
If the env variable configured properly, you should see data in Live Stream.
The count of the events and telemetry which you can see in Application Insights depends on environment configuration.
To determine the runtime environment, ASP.NET Core reads from the following environment variable:
Production - the default. If
ASPNETCORE_ENVIRONMENThas not been set.
You can setup it if via Environment Variable or Web.Config file.
Also, you can check the current runtime mode in the custom properties. We recommend to use
Production for production environments.
Example: Development mode is activated.
Some of the settings can be configured in Application Insights section for App Service.
What is Azure Application Insights? - Azure Monitor | Microsoft Docs
Application Map in Azure Application Insights - Azure Monitor | Microsoft Docs
Azure Application Insights Transaction Diagnostics - Azure Monitor | Microsoft Docs
Use multiple environments in ASP.NET Core | Microsoft Docs