Skip to content
This repository has been archived by the owner on Jul 5, 2020. It is now read-only.

Ignore Deprecated events if running under netcore20 #728

Merged
merged 3 commits into from
Nov 8, 2017

Conversation

cijothomas
Copy link
Contributor

Ignore Deprecated events if running under netcore20 as it publishes newer events.

Attempt to fix #723

@cijothomas
Copy link
Contributor Author

@lmolkova i was playing with this and ended up with this! Can you see if this is the fix indeed?

@@ -66,6 +69,9 @@ internal class HttpCoreDiagnosticSourceListener : IObserver<KeyValuePair<string,
this.client = new TelemetryClient(configuration);
this.client.Context.GetInternalContext().SdkVersion = SdkVersionUtils.GetSdkVersion("rdd" + RddSource.DiagnosticSourceCore + ":");

var httpClientVersion = typeof(HttpClient).GetTypeInfo().Assembly.GetName().Version;
this.isNetCore20HttpClient = httpClientVersion.CompareTo(new Version(4, 2)) >= 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps you can also remove this code from subscriber and pass isNetCore20HttpClient to subscriber's constructor

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right.. less code duplication :)

Copy link
Member

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fix the issue

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

Successfully merging this pull request may close these issues.

When debugging netcoreapp2.0 in VS, http dependencies are tracked twice
2 participants