Sitelet https://github.com/Microsoft/ApplicationInsights-dotnet-server/issues/723
Skip to content
This repository was archived by the owner on Jul 5, 2020. It is now read-only.
This repository was 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

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions