opentelemetry-dotnet-contrib icon indicating copy to clipboard operation
opentelemetry-dotnet-contrib copied to clipboard

`RecordException = true` behavior in Http instrumentation

Open vishweshbankwar opened this issue 3 years ago • 0 comments

Unit tests validating the behavior (i.e. whether the output span will contain the exception event) was added in https://github.com/open-telemetry/opentelemetry-dotnet/pull/3761. Opening this issue to summarize the details and discuss any improvements that may be needed towards making the experience consistent. Following table summarizes the output for each method that was added in unit test.

Class Name Method Name Response code Exception SpanEvent
HttpClient GetAsync Error response code No
HttpClient GetAsync Network error Yes
HttpClient GetStringAsync Network error Yes
HttpClient GetStringAsync Error response code No
WebRequest GetResponseAsync Error response code Yes
WebRequest GetResponseAsync Network error Yes

vishweshbankwar avatar Oct 17 '22 15:10 vishweshbankwar