-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding more information and events to System.Net.Http telemetry #83734
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsWhile we include a decent amount of information about a request in the void RequestStart(string scheme, string host, int port, string pathAndQuery, byte versionMajor, byte versionMinor, HttpVersionPolicy versionPolicy);
void RequestFailed(); We've heard from customers moving from .NET Framework where they could get information like the response status code from the
I propose we include more information on the following (existing)
|
It makes sense for me personally, but not sure if it's the preferred practice in .NET. Eg. |
We've added the following information to the The following parameters to existing events: -void RequestStop()
+void RequestStop(int statusCode)
-void ResponseHeadersStop()
+void ResponseHeadersStop(int statusCode)
-void RequestFailed();
+void RequestFailed(string exceptionMessage) and a new event under a dedicated keyword [Event(15, Level = EventLevel.Error, Keywords = Keywords.RequestFailedDetailed)]
void RequestFailedDetailed(string exception); We've also backported adding the |
Fixed in main (8.0) in PR #84036 |
While we include a decent amount of information about a request in the
RequestStart
event, we provide almost no information about what happened with the response (outside of timestamps/latency info for various steps during a request).We've heard from customers moving from .NET Framework where they could get information like the response status code from the
System.Diagnostics.Eventing.FrameworkEventSource
provider, e.g.:I propose we include more information on the following (existing)
System.Net.Http
events:RequestStop
.ResponseHeadersStop
.ResponseHeadersStop
in addition toRequestStop
because we may not have a status code available inRequestStop
in failure cases, and because a singleRequestStart
may span multiple actual requests internally due to redirects (or custom user handler logic such as retries). Having a status code on theRequestStop
is still valuable for users that just care about the result of the HttpClient call, without diving into details of what happened as part of that call. See 003e675#r103790748 for more discussion about this.RequestFailed
.HttpRequestException
's message. @antonfirsov is including theHttpRequestError
in the message string something you've considered?The remaining set of potential improvements is now tracked by #85729.
The text was updated successfully, but these errors were encountered: