{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-server/issues/752","repository_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-server","labels_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-server/issues/752/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-server/issues/752/comments","events_url":"https://api.github.com/repos/Microsoft/ApplicationInsights-dotnet-server/issues/752/events","html_url":"https://github.com/Microsoft/ApplicationInsights-dotnet-server/issues/752","id":276325018,"number":752,"title":"QuickPulse Generating Large Numbers of Errors","user":{"login":"ANMain","id":19570100,"avatar_url":"https://avatars3.githubusercontent.com/u/19570100?v=4","gravatar_id":"","url":"https://api.github.com/users/ANMain","html_url":"https://github.com/ANMain","followers_url":"https://api.github.com/users/ANMain/followers","following_url":"https://api.github.com/users/ANMain/following{/other_user}","gists_url":"https://api.github.com/users/ANMain/gists{/gist_id}","starred_url":"https://api.github.com/users/ANMain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ANMain/subscriptions","organizations_url":"https://api.github.com/users/ANMain/orgs","repos_url":"https://api.github.com/users/ANMain/repos","events_url":"https://api.github.com/users/ANMain/events{/privacy}","received_events_url":"https://api.github.com/users/ANMain/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-11-23T10:26:54Z","updated_at":"2017-11-29T14:01:51Z","closed_at":"2017-11-29T14:01:51Z","author_association":"NONE","body":"I am seeing a large number of error messages (>12k) per day for each application that I am running in a Service Fabric cluster. This is completely blocking up the Live Metrics Stream. The error message is:\r\n\r\n```\r\nAI (Internal): Unexpected error in QuickPulse infrastructure: System.InvalidOperationException: Can't start collection while it is already running.\r\n   at Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor.Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.IQuickPulseTelemetryProcessor.StartCollection(IQuickPulseDataAccumulatorManager accumulatorManager, Uri serviceEndpoint, TelemetryConfiguration configuration, Boolean disableFullTelemetryItems)\r\n   at Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.OnStartCollection()\r\n   at Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.Implementation.QuickPulse.QuickPulseCollectionStateManager.UpdateState(String instrumentationKey, String authApiKey)\r\n   at Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule.StateThreadWorker(Object state). QuickPulse data will not be available.\r\n```\r\n\r\n## Repro Steps\r\nCustom Application Insights processors are configured in the `Startup.cs` class:\r\n```\r\npublic void ConfigureServices(IServiceCollection services)\r\n{\r\n    TelemetryConfiguration.Active\r\n        .TelemetryProcessorChainBuilder\r\n        .UseHealthCheckFilter()\r\n        .Build();\r\n            \r\n    services\r\n        .AddOptions()\r\n        .AddApplicationInsightsTelemetry(Configuration.GetSection(nameof(ApplicationInsightsConfiguration)))\r\n        .AddMvc();\r\n}\r\n```\r\n\r\nThere is also a default `applicationinsights.config` that was generated when the project was created and adds the performance counters that appear to be causing the issue:\r\n```\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<ApplicationInsights xmlns=\"http://schemas.microsoft.com/ApplicationInsights/2013/Settings\">\r\n  <TelemetryInitializers>\r\n    <Add Type=\"Microsoft.ApplicationInsights.DependencyCollector.HttpDependenciesParsingTelemetryInitializer, Microsoft.AI.DependencyCollector\"/>\r\n    <Add Type=\"Microsoft.ApplicationInsights.ServiceFabric.FabricTelemetryInitializer, Microsoft.AI.ServiceFabric\"/>\r\n  </TelemetryInitializers>\r\n  <TelemetryModules>\r\n    <Add Type=\"Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule, Microsoft.AI.DependencyCollector\">\r\n      <ExcludeComponentCorrelationHttpHeadersOnDomains>\r\n        <Add>core.windows.net</Add>\r\n        <Add>core.chinacloudapi.cn</Add>\r\n        <Add>core.cloudapi.de</Add>\r\n        <Add>core.usgovcloudapi.net</Add>\r\n      </ExcludeComponentCorrelationHttpHeadersOnDomains>\r\n    </Add>\r\n    <Add Type=\"Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule, Microsoft.AI.PerfCounterCollector\"/>\r\n    <Add Type=\"Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule, Microsoft.AI.PerfCounterCollector\"/>\r\n  </TelemetryModules>\r\n  <TelemetryProcessors>\r\n    <Add Type=\"Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor, Microsoft.AI.PerfCounterCollector\"/>\r\n    <Add Type=\"Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel\">\r\n      <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>\r\n    </Add>\r\n  </TelemetryProcessors>\r\n  <TelemetryChannel Type=\"Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel, Microsoft.AI.ServerTelemetryChannel\"/>\r\n</ApplicationInsights>\r\n```\r\n\r\n## Version Info \r\nSDK Version : Microsoft.ApplicationInsights 2.4.0, Microsoft.ApplicationInsights.AspNetCore 2.1.1, Microsoft.ApplicationInsights.ServiceFabric.Native 1.0.0-beta2\r\n.NET Version :\t4.6.1\r\nHow Application was onboarded with SDK(VisualStudio/StatusMonitor/Azure Extension) : Configured in code\r\nOS : Windows 10\r\nHosting Info (IIS/Azure WebApps/ etc) : Azure WebApps"}}
{"actor":{"display_login":"ANMain"}}