microsoft / ApplicationInsights-dotnet

ApplicationInsights-dotnet
MIT License
566 stars 285 forks source link

SDK ceiling up CPU on 5-10K/s TrackEvent calls without sending any data #1605

Closed netgh0st closed 4 years ago

netgh0st commented 6 years ago

If you are reporting bug/issue, please provide detailed Repro instructions.

Repro Steps

  1. Implement a processor that drops all Event documents (see BlockTracesAndEventsTelemetryProcessor.zip for example)
  2. Implement any logic that would call TrackEvent at a rate of 5-10K calls per second

Actual Behavior

Process uses up all CPU, with most of the time spend inside Initialize method

Expected Behavior

Since no data is being send, no noticeable impact on process CPU time from adding TrackEvent calls

trackevent dottrace

Version Info

SDK Version : 2.4.0 .NET Version : 4.7
How Application was onboarded with SDK(VisualStudio/StatusMonitor/Azure Extension) : VisualStudio OS : Windows Server 2016 Hosting Info (IIS/Azure WebApps/ etc) : Cloud Service (PaaS v1)

cijothomas commented 4 years ago

Closing old issue. Even if no data is sent, all TI is still run.