Skip to content
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
lmolkova opened this issue Oct 30, 2017 · 5 comments · Fixed by #728
Closed

When debugging netcoreapp2.0 in VS, http dependencies are tracked twice #723

lmolkova opened this issue Oct 30, 2017 · 5 comments · Fixed by #728
Labels
Milestone

Comments

@lmolkova
Copy link
Member

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.

@lmolkova lmolkova added the bug label Oct 30, 2017
@SergeyKanzhelev
Copy link
Contributor

So you receive every http call twice?

@lmolkova
Copy link
Member Author

@SergeyKanzhelev @Dmitry-Matveev @zakimaksyutov @cijothomas how far are you guys from releasing 2.5? Could we include the fix for it? Should be pretty straightforward and small fix.

@lmolkova
Copy link
Member Author

@SergeyKanzhelev exactly, all http calls are tracked twice when debugging in VS

@Dmitry-Matveev Dmitry-Matveev added this to the 2.5-Beta2 milestone Oct 30, 2017
@Dmitry-Matveev
Copy link
Member

@lmolkova , 2.5-Beta1 is around the corner. 2.5 stable was initially planned for this quarter, but no certain date yet. 2.5-Beta2 is the closest and was planned for November.

@lmolkova
Copy link
Member Author

lmolkova commented Mar 9, 2018

#848

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants