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/asp-net-core.md
+12-47Lines changed: 12 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -656,6 +656,16 @@ public class HomeController : Controller
656
656
657
657
For more information about custom data reporting in ApplicationInsights, see [ApplicationInsightscustommetricsAPIreference](./api-custom-events-metrics.md). AsimilarapproachcanbeusedforsendingcustommetricstoApplicationInsightsbyusingthe [GetMetricAPI](./get-metric.md).
658
658
659
+
### How do I capture Request and Response body in my telemetry?
660
+
661
+
ASP.NETCorehas [built-in
662
+
support](https://learn.microsoft.com/aspnet/core/fundamentals/http-logging) for
663
+
logging HTTP Request/Responseinformation (includingbody) via
664
+
[`ILogger`](#ilogger-logs). It is recommended to leverage this. This may
665
+
potentially expose personally identifiable information (PII) in telemetry, and
666
+
can cause costs (performancecostsandApplicationInsightsbilling) to
667
+
significantly increase, so evaluate the risks carefully before using this.
668
+
659
669
### How do I customize ILogger logs collection?
660
670
661
671
The default setting for Application Insights is to only capture **Warning** and more severe logs.
@@ -721,55 +731,10 @@ If the SDK is installed at build time as shown in this article, you don't need t
This limitation isn't applicable from version [2.15.0](https://www.nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore/2.15.0) and later.
769
734
770
-
### Is this SDK supported for the new .NET Core 3.X Worker Service template applications?
735
+
### Is this SDK supported for Worker Services?
771
736
772
-
This SDK requires `HttpContext`. It doesn't work in any non-HTTPapplications, includingthe .NETCore 3.XWorkerServiceapplications. ToenableApplicationInsightsinsuchapplicationsbyusingthenewlyreleasedMicrosoft.ApplicationInsights.WorkerServiceSDK, see[ApplicationInsightsforWorkerServiceapplications (non-HTTPapplications)](worker-service.md).
0 commit comments