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

Net core 2.0 HttpClient will start to send new and deprecated events in the next release #566

Closed
lmolkova opened this issue May 11, 2017 · 0 comments · Fixed by #570
Closed
Assignees
Labels

Comments

@lmolkova
Copy link
Member

lmolkova commented May 11, 2017

Currently HttpClient on .net core 2.0 check if someone listens to 'System.Net.Http.HttpRequestOut*' event and then send 'new' evenst only.
Otherwise, for backward compatibility it also checks if someone listens to deprecated 'System.Net.Http.Request/Response' events.

This introduces issue described in https://github.com/dotnet/corefx/issues/18762 when 2 different listeners are interested in different events: e.g. Glimpse of old version and AI of new version.

In the future release of HttpClient, it will check for both events and will send both if they are enabled: dotnet/corefx#19659

HttpCoreDiagnosticSourceListener listens to both sets of events (because it targets netstandard1.6 and does not know which runtime will be used). So with the future HttpClient, it will report the same telemetry twice.

AI Listener needs to ignore 'old' event on the new runtime similarly to how it's done in AspNetCore incoming request listener, but old events should be rejected in IsEnabled callback, rather than in the event callback.

This needs to be done in 2.4.0 stable release

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