microsoft / ApplicationInsights-dotnet-server

Microsoft Application Insights for .NET Web Applications
https://azure.microsoft.com/services/application-insights/
133 stars 67 forks source link

Suddenly throwing random exception: 'ProcessId was not available in the samples we gathered' #1241

Closed tincann closed 5 years ago

tincann commented 5 years ago

Repro Steps

This problem started after a deploy, which does not contain any Application Insights related changes. This problem does not seem to affect the rest of the application.

Actual Behavior

First exception started on July 19th 2019 15:48. In the following 4 days, the exception has been thrown 42 times, at random intervals at approximately every 1-3 hours.

Exception message:

ProcessId was not available in the samples we gathered

System.InvalidOperationException:
   at Microsoft.ServiceProfiler.Collectors.DetailedTraceCollector.ExtractMetadata (ApplicationInsightsProfiler, Version=2.6.1906.2801, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at Microsoft.ServiceProfiler.Collectors.DetailedTraceCollector.PostApplicationInsightsTraceSampleEvents (ApplicationInsightsProfiler, Version=2.6.1906.2801, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at Microsoft.ServiceProfiler.Collectors.DetailedTraceCollector+<StopCollectingAndUploadTraceAsync>d__38.MoveNext (ApplicationInsightsProfiler, Version=2.6.1906.2801, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
   at Microsoft.ServiceProfiler.Engine+<>c__DisplayClass1_1+<<RunAsync>b__2>d.MoveNext (ApplicationInsightsProfiler, Version=2.6.1906.2801, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
   at Microsoft.ServiceProfiler.Agent.Orchestration.Orchestrator+<TraceAsyncOperation>d__18.MoveNext (Microsoft.ServiceProfiler.Agent.Orchestration, Version=2.6.1906.2801, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)

Expected Behavior

This exception shouldn't be thrown.

Version Info

SDK Version : Microsoft.ApplicationInsights 2.10.0 (Microsoft.ApplicationInsights.AspNetCore 2.7.0) .NET Version : .NET Core 2.2.5 How Application was onboarded with SDK(VisualStudio/StatusMonitor/Azure Extension) : Nuget package OS : Windows Hosting Info (IIS/Azure WebApps/ etc) : Azure WebApps

pharring commented 5 years ago

@tincann This is a problem with the profiler agent. I've forwarded this to serviceprofilerhelp@microsoft.com for you.

cweining commented 5 years ago

@tincann It might be best if we could meet with you to do some debugging of your application. Could you please email serviceprofilerhelp@microsoft.com so we can setup a time to meet? We have tried to reproduce the issue and have not been able to.

tincann commented 5 years ago

@cweining Thank you, Chuck! I've sent an email to the address. I'm also having trouble reproducing it. Our testing and acceptance environments supposedly run the exact same code as production, but on those environments we do not see the exception.

cijothomas commented 5 years ago

I assume this is being dealt with with service profiler team already. Closing this as no action on this repo. Please let me know otherwise.