Try our conversational search powered by Generative AI!

Exclude or limit automated Application Insights log entries



We are trying to remove or reduce our Application Insights DEPENDENCY logs.

Background: We have a DXP hosted instance of EpiServer. Our custom log entries only appear in application insights intermittently, this seems to be down to throttling and downsampling due to the sheer volume of entries. The biggest culprit seem to be the  DEPENDENCY type logs i.e. our mostly idle dev instance has 355K of these log entries per day, and our prod instance has about 1.05M per day. Most of these are meaningless SQL command logs. 

Things we have tried so far:

  • We've edited the ApplicationInsights.config and removed HttpDependenciesParsingTelemetryInitializer from the TelemetryInitializers
  • We've edited the ApplicationInsights.config and removed DependencyTrackingTelemetryModule from the TelemetryModules
  • We've created a custom ITelemetryProcessor as per
          (I notice in the debugger that this only hits for Trace logs, but not the DEPENDENCY ones)
  • We've completely removed the ApplicationInsights.config 
  • We've completely removed all logging (i.e. Microsoft.ApplicationInsights, System.Diagnostics.DiagnosticSource, and Microsoft.AspNet.TelemetryCorrelation nuget packages) 
          (this removes all custom log entries. however the DEPENDENCY TCP SQL logs still remain!)

    Any advise or suggestions of how to remove these DEPENDENCY logs from being logged would be appreciated


    Edited, Nov 10, 2022 14:57

    We eventually solved this. The custom ITelemetryProcessor worked once we moved the initialisation from ConfigureServices in Startup.cs to Application_Start in Global.asax instead. I think maybe this allows it to be initiliased earlier in the lifecycle.

    Edited, Jan 10, 2023 11:07
    This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
    * You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.