You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/azure-web-apps-net.md
+17-18Lines changed: 17 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,7 @@ Enabling monitoring on your ASP.NET-based web applications running on [Azure App
15
15
> [!NOTE]
16
16
> Manually adding an Application Insights site extension via **Development Tools** > **Extensions** is deprecated. This method of extension installation was dependent on manual updates for each new version. The latest stable release of the extension is now [preinstalled](https://github.com/projectkudu/kudu/wiki/Azure-Site-Extensions) as part of the App Service image. The files are located in *d:\Program Files (x86)\SiteExtensions\ApplicationInsightsAgent* and are automatically updated with each stable release. If you follow the auto-instrumentation instructions to enable monitoring, it will automatically remove the deprecated extension for you.
17
17
18
-
> [!NOTE]
19
-
> If both auto-instrumentation monitoring and manual SDK-based instrumentation are detected, only the manual instrumentation settings will be honored. This arrangement prevents duplicate data from being sent. To learn more, see the [troubleshooting section](#troubleshooting).
18
+
If both auto-instrumentation monitoring and manual SDK-based instrumentation are detected, only the manual instrumentation settings will be honored. This arrangement prevents duplicate data from being sent. To learn more, see the [Troubleshooting section](#troubleshooting).
@@ -25,7 +24,7 @@ Enabling monitoring on your ASP.NET-based web applications running on [Azure App
25
24
For a complete list of supported auto-instrumentation scenarios, see [Supported environments, languages, and resource providers](codeless-overview.md#supported-environments-languages-and-resource-providers).
26
25
27
26
> [!NOTE]
28
-
> The combination of `APPINSIGHTS_JAVASCRIPT_ENABLED` and `urlCompression` isn't supported. For more information, see the explanation in the [troubleshooting section](#appinsights_javascript_enabled-and-urlcompression-isnt-supported).
27
+
> The combination of `APPINSIGHTS_JAVASCRIPT_ENABLED` and `urlCompression` isn't supported. For more information, see the explanation in the [Troubleshooting section](#appinsights_javascript_enabled-and-urlcompression-isnt-supported).
29
28
30
29
1.**Select Application Insights** in the Azure control panel for your app service. Then select **Enable**.
31
30
@@ -34,7 +33,7 @@ For a complete list of supported auto-instrumentation scenarios, see [Supported
34
33
1. Choose to create a new resource, or select an existing Application Insights resource for this application.
35
34
36
35
> [!NOTE]
37
-
> When you select **OK** to create the new resource, you're prompted to **Apply monitoring settings**. Selecting **Continue** links your new Application Insights resource to your app service. Doing so also triggers a restart of your app service.
36
+
> When you select **OK** to create the new resource, you're prompted to select **Apply monitoring settings**. Selecting **Continue** links your new Application Insights resource to your app service. Doing so also triggers a restart of your app service.
38
37
39
38
:::image type="content"source="./media/azure-web-apps/change-resource.png" alt-text="Screenshot that shows the Change your resource dropdown.":::
40
39
@@ -52,9 +51,9 @@ For a complete list of supported auto-instrumentation scenarios, see [Supported
52
51
| Improves APM metrics accuracy under load, when sampling is used | Yes |Yes |
53
52
| Correlates micro-services across request/dependency boundaries | No (single-instance APM capabilities only) |Yes |
54
53
55
-
1. To configure sampling, which you could previously control via the *applicationinsights.config* file, you can now interact with it via Application settings with the corresponding prefix `MicrosoftAppInsights_AdaptiveSamplingTelemetryProcessor`.
54
+
1. To configure sampling, which you could previously control via the *applicationinsights.config* file, you can now interact with it via application settings with the corresponding prefix `MicrosoftAppInsights_AdaptiveSamplingTelemetryProcessor`.
56
55
57
-
- For example, to change the initial sampling percentage, you can create an Application setting of `MicrosoftAppInsights_AdaptiveSamplingTelemetryProcessor_InitialSamplingPercentage` and a value of `100`.
56
+
- For example, to change the initial sampling percentage, you can create an application setting of `MicrosoftAppInsights_AdaptiveSamplingTelemetryProcessor_InitialSamplingPercentage` and a value of `100`.
58
57
- To disable sampling, set `MicrosoftAppInsights_AdaptiveSamplingTelemetryProcessor_MinSamplingPercentage` to a value of `100`.
@@ -89,17 +88,17 @@ To enable telemetry collection with Application Insights, only application setti
89
88
|App setting name | Definition | Value |
90
89
|-----------------|:------------|-------------:|
91
90
|ApplicationInsightsAgent_EXTENSION_VERSION | Main extension, which controls runtime monitoring. |`~2`|
92
-
|XDT_MicrosoftApplicationInsights_Mode | In default mode, only essential features are enabled to ensure optimal performance. |`default` or `recommended`.|
91
+
|XDT_MicrosoftApplicationInsights_Mode | In default mode, only essential features are enabled to ensure optimal performance. |`default` or `recommended`|
93
92
|InstrumentationEngine_EXTENSION_VERSION | Controls if the binary-rewrite engine `InstrumentationEngine` will be turned on. This setting has performance implications and affects cold start/startup time. |`~1`|
94
93
|XDT_MicrosoftApplicationInsights_BaseExtensions | Controls if SQL and Azure table text will be captured along with the dependency calls. Performance warning: Application cold startup time will be affected. This setting requires the `InstrumentationEngine`. |`~1`|
Upgrading from version 2.8.9 happens automatically, without any extra actions. The new monitoring bits are delivered in the background to the target app service, and on application restart they'll be picked up.
101
+
Upgrading from version 2.8.9 happens automatically, without any extra actions. The new monitoring bits are delivered in the background to the target app service. They'll be picked when the application restarts.
103
102
104
103
To check which version of the extension you're running, go to `https://yoursitename.scm.azurewebsites.net/ApplicationInsights`.
105
104
@@ -109,18 +108,18 @@ To check which version of the extension you're running, go to `https://yoursiten
109
108
110
109
Starting with version 2.8.9, the preinstalled site extension is used. If you're on an earlier version, you can update via one of two ways:
111
110
112
-
*[Upgrade by enabling via the portal](#enable-auto-instrumentation-monitoring). (Even if you have the Application Insights extension for App Service installed. The UI shows only the **Enable** button. Behind the scenes, the old private site extension will be removed.)
111
+
*[Upgrade by enabling via the portal](#enable-auto-instrumentation-monitoring): Even if you have the Application Insights extension for App Service installed. The UI shows only the **Enable** button. Behind the scenes, the old private site extension will be removed.
113
112
*[Upgrade through PowerShell](#enable-through-powershell):
114
113
115
-
1. Set the application settings to enable the preinstalled site extension `ApplicationInsightsAgent`. See[Enable through PowerShell](#enable-through-powershell).
114
+
1. Set the application settings to enable the preinstalled site extension `ApplicationInsightsAgent`. For more information, see[Enable through PowerShell](#enable-through-powershell).
116
115
1. Manually remove the private site extension named Application Insights extension for App Service.
117
116
118
-
If the upgrade is done from a version prior to 2.5.1, check that the Application Insights dlls are removed from the application bin folder[see troubleshooting steps](#troubleshooting).
117
+
If the upgrade is done from a version prior to 2.5.1, check that the Application Insights DLLs are removed from the application bin folder. For more information, see the steps in the [Troubleshooting section](#troubleshooting).
119
118
120
119
## Troubleshooting
121
120
122
121
> [!NOTE]
123
-
> When you create a web app with the `ASP.NET` runtimes in App Service it deploys a single static HTML page as a starter website. We do *not* recommend that you troubleshoot an issue with a default template. Deploy an application before you troubleshoot an issue.
122
+
> When you create a web app with the `ASP.NET` runtimes in App Service, it deploys a single static HTML page as a starter website. We do *not* recommend that you troubleshoot an issue with a default template. Deploy an application before you troubleshoot an issue.
124
123
125
124
Here's our step-by-step troubleshooting guide for extension/agent-based monitoring for ASP.NET-based applications running on App Service.
If a similar value isn't present, it means the application isn't currently running or isn't supported. To ensure that the application is running, try manually visiting the application URL/application endpoints, which will allow the runtime information to become available.
139
138
140
139
- Confirm that `IKeyExists` is `true`.
141
-
If not, add `APPINSIGHTS_INSTRUMENTATIONKEY` and `APPLICATIONINSIGHTS_CONNECTION_STRING` with your ikey guid to your application settings.
140
+
If not, add `APPINSIGHTS_INSTRUMENTATIONKEY` and `APPLICATIONINSIGHTS_CONNECTION_STRING` with your instrumentation key GUID to your application settings.
142
141
143
142
- Confirm that there are no entries for `AppAlreadyInstrumented`, `AppContainsDiagnosticSourceAssembly`, and `AppContainsAspNetTelemetryCorrelationAssembly`.
144
143
@@ -174,7 +173,7 @@ The following table provides a more detailed explanation of what these values me
174
173
|Problem value|Explanation|Fix
175
174
|---- |----|---|
176
175
| `AppAlreadyInstrumented:true` | This value indicates that the extension detected that some aspect of the SDK is already present in the application and will back off. It can be because of a reference to `System.Diagnostics.DiagnosticSource`, `Microsoft.AspNet.TelemetryCorrelation`, or `Microsoft.ApplicationInsights`. | Remove the references. Some of these references are added by default from certain Visual Studio templates. Older versions of Visual Studio might add references to `Microsoft.ApplicationInsights`.
177
-
|`AppAlreadyInstrumented:true` | This value can also be caused by the presence of the preceding DLLs in the app folder from a previous deployment. | Clean the app folder to ensure that these DLLs are removed. Check both your local app's bin directory and the wwwroot directory on the App Service resource. (To check the wwwroot directory of your App Service web app, select **Advanced Tools (Kudu)** > **Debug console** > **CMD** > **home\site\wwwroot**.)
176
+
|`AppAlreadyInstrumented:true` | This value can also be caused by the presence of the preceding DLLs in the app folder from a previous deployment. | Clean the app folder to ensure that these DLLs are removed. Check both your local app's bin directory and the wwwroot directory on the App Service resource. To check the wwwroot directory of your App Service web app, select **Advanced Tools (Kudu)** > **Debug console** > **CMD** > **home\site\wwwroot**.
178
177
|`AppContainsAspNetTelemetryCorrelationAssembly: true` | This value indicates that the extension detected references to `Microsoft.AspNet.TelemetryCorrelation` in the application and will back off. | Remove the reference.
179
178
|`AppContainsDiagnosticSourceAssembly**:true`|This value indicates that the extension detected references to `System.Diagnostics.DiagnosticSource` in the application and will back off.| For ASP.NET, remove the reference.
180
179
|`IKeyExists:false`|This value indicates that the instrumentation key isn't present in the app setting `APPINSIGHTS_INSTRUMENTATIONKEY`. Possible causes might be that the values were accidentally removed, or you forgot to set the values in the automation script. | Make sure the setting is present in the App Service application settings.
@@ -192,7 +191,7 @@ To resolve this issue, remove the binding redirect entry for `System.Runtime.Com
192
191
</dependentAssembly>
193
192
```
194
193
195
-
As a temporary workaround, you could set the app setting `ApplicationInsightsAgent_EXTENSION_VERSION` to a value of `2.8.37`. This setting will trigger App Service to use the old Application Insights extension. Note that temporary mitigations should only be used as an interim.
194
+
As a temporary workaround, you could set the app setting `ApplicationInsightsAgent_EXTENSION_VERSION` to a value of `2.8.37`. This setting will trigger App Service to use the old Application Insights extension. Temporary mitigations should only be used as an interim.
196
195
197
196
## Release notes
198
197
@@ -205,5 +204,5 @@ For the latest updates and bug fixes, see the [release notes](web-app-extension-
205
204
*[Enable Azure diagnostics](../agents/diagnostics-extension-to-application-insights.md) to be sent to Application Insights.
206
205
*[Monitor service health metrics](../data-platform.md) to make sure your service is available and responsive.
207
206
*[Receive alert notifications](../alerts/alerts-overview.md) whenever operational events happen or metrics cross a threshold.
208
-
* Use [Application Insights for JavaScript apps and web pages](javascript.md) to get client telemetry from the browsers that visit a webpage.
207
+
* Use [Application Insights for JavaScript apps and webpages](javascript.md) to get client telemetry from the browsers that visit a webpage.
209
208
*[Set up Availability web tests](monitor-web-app-availability.md) to be alerted if your site is down.
0 commit comments