Application insights failing to load telemetry - Azure App service, .net 4.8

Rich Hamack 25 Reputation points
2023-05-08T17:05:43.97+00:00

Application insights configured from the portal on Azure App Service using .net 4.8, asp.net mvc. Dependency tracking works well, but no telemetry.

Trace events show that module is not loading:

AI (Internal): [Redfield-Microsoft-ApplicationInsights-Extensibility-Web] TelemetryInitializer Microsoft.ApplicationInsights.Web.OperationCorrelationTelemetryInitializer failed to initialize telemetry item System.MissingMethodException: Method not found: 'Boolean Microsoft.AspNet.TelemetryCorrelation.ActivityExtensions.Extract(System.Diagnostics.Activity, System.Collections.Specialized.NameValueCollection)'.
   at Microsoft.ApplicationInsights.Web.Implementation.RequestTrackingExtensions.CreateRequestTelemetryPrivate(HttpContext platformContext)
   at Microsoft.ApplicationInsights.Web.Implementation.RequestTrackingExtensions.ReadOrCreateRequestTelemetryPrivate(HttpContext platformContext)
   at Microsoft.ApplicationInsights.Web.Implementation.WebTelemetryInitializerBase.Initialize(ITelemetry telemetry)

The application was initially configured manually in Visual Studio, but then all application insights NuGet packages were removed in favor of using the built-in agent in Azure App Service. As far as I know, all remnants of application insights have been remove, but still unsure if there is any remaining.

Everything worked great until about 2 weeks prior, when telemetry disappeared.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,212 questions
{count} votes

Accepted answer
  1. Grmacjon-MSFT 17,136 Reputation points
    2023-07-11T07:15:11.4666667+00:00

    Hello @Rich Hamack

    I'm glad your issue was resolve and thanks for posting the solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue:

    -Application insights failing to load telemetry - Azure App service, .net 4.8

    -The application was initially configured manually in Visual Studio, but then all application insights NuGet packages were removed in favor of using the built-in agent in Azure App Service.
    -At first everything worked fine, but then the telemetry disappeared.

    Solution:

    "I found the actual problem. After I cleared out the set of DLL's from the project, I was deploying via Azure DevOps to the application service. I had not checked the box to clear out all existing files in the service which were not included in the deployment (to see this checkbox, we now need to manually select a deployment method). After selecting this option in the release, the old assemblies were cleared out of the app service bin folder, which removed the conflict. Application Insights began collecting and correlating telemetry from that point on."

    Thanks again for sharing your solution.

    Best,

    Grace

    0 comments No comments

0 additional answers

Sort by: Most helpful