Skip to content

Commit 39b6607

Browse files
authored
Merge pull request #97036 from geann/patch-1
Code snippet improvement
2 parents 2ccaf00 + 457f057 commit 39b6607

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

articles/azure-monitor/app/asp-net-exceptions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ namespace MVC2App.Controllers
247247
{
248248
if (filterContext != null && filterContext.HttpContext != null && filterContext.Exception != null)
249249
{
250-
//If customError is Off, then AI HTTPModule will report the exception
250+
//The attribute should track exceptions only when CustomErrors setting is On
251+
//if CustomErrors is Off, exceptions will be caught by AI HTTP Module
251252
if (filterContext.HttpContext.IsCustomErrorEnabled)
252253
{ //or reuse instance (recommended!). see note above
253254
var ai = new TelemetryClient();

0 commit comments

Comments
 (0)