Quark Soup
Quark Soup

Reputation: 4750

How do you Disable HTTP Request traces in Application Insights?

I have a web service which polls another web service for data continuously. I just upgraded the version of Application Insights I was using to:

<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />

Now I have a continuous stream of HTTP events in my Azure event log that look like this:

9/17/2022, 1:37:31 PM - REQUEST
GET Orders/GetOrders [rowVersion]
https://development.thetarex.com/viewModel/quotes Request Code: 200 Response time: 4.8 ms

How do I get rid of these? I already have this in the settings file:

  "ApplicationInsights": {
    "EnableAdaptiveSampling": false,
    "EnableDependencyTrackingTelemetryModule": false,
    "InstrumentationKey": "0298fcb7-58c1-4a7f-9030-fe99f3a60504"
  },

But nothing seems to inhibit these HTTP event messages.

Upvotes: 1

Views: 1545

Answers (1)

Quark Soup
Quark Soup

Reputation: 4750

In case anyone is having the same issue, I was almost there, just needed one more line in the appsettings file:

  "ApplicationInsights": {
    "EnableDependencyTrackingTelemetryModule": false,
    "EnableRequestTrackingTelemetryModule": false,
    "InstrumentationKey": "0198fcb7-58c1-4e7f-9030-fe99f3a60504"
  },

This seemed to clear out the Azure log so only my messages showed up.

Upvotes: 1

Related Questions