This repository has been archived by the owner on Jul 5, 2020. It is now read-only.
This repository has been archived by the owner on Jul 5, 2020. It is now read-only.
When debugging netcoreapp2.0 in VS, http dependencies are tracked twice #723
Closed
Description
openedon Oct 30, 2017
HttpClient in 2.0 fires deprecated and 'new' events.
When debugging, VS subscribes to deprecated events, AppInsights subscribes to 'new' events from 2.0 client (but also listens to old events to support older versions).
AppInsights attempts to filter out old events for 2.0 clients (https://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/develop/Src/DependencyCollector/Shared/Implementation/HttpCoreDiagnosticSourceListener.cs#L560) with IsEnabled callback.
However when there are 2 listeners for diagnostics source, it's enough if just one of them returns true for IsEnabled, then all listeners get the notification.
So, isNetCore20HttpClient
check should be done in OnRequest
and OnResponse
callbacks too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment