Setting the Instrumentation Key in Application settings

In ASP.NET Core, the configuration system is built in a hierarchy in a way that a higher-level provider can override the configuration values that were set by a lower-level provider. By default, environment variables are highest in the hierarchy and will override other values for the same key.

To set environment variables inside your App Service environment, click on the Application settings menu item in the left-hand menu:

The APPINSIGHTS_INSTRUMENTATIONKEY setting was added automatically when you connected your App Service to Application Insights.

When the Application Insights logger is created in your ASP.NET Core application, it will look for this key and load the instrumentation key from it. 

This way, you can set the instrumentation key in your cloud environment without risking it by storing it in the source control.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.142.250