Search code examples
azureazure-application-insightstelemetryazure-application-insights-profiler

Why does App Insights NUGET add 2 AdapativeSamplingTelemetryProcessor nodes?


In the ApplicationInsights.config this node (see below) is being added twice, although they are not identical.

Why is it being added twice like this? It appears the 2nd node is just negating the 1st node (its just including what the 1st node is excluding). Is this a bug?

<TelemetryProcessors>
    <Add Type="Microsoft.ApplicationInsights.Extensibility.AutocollectedMetricsExtractor, Microsoft.ApplicationInsights"/>
    <Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
      <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
      <ExcludedTypes>Event</ExcludedTypes>
    </Add>
    <Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
      <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
      <IncludedTypes>Event</IncludedTypes>
    </Add>
  </TelemetryProcessors>

Solution

  • It's not a bug, it's by default.

    Please refer to here for more details. Provide a screenshot of that article:

    enter image description here