Skip to content

RecordException = true behavior in Http instrumentation #2014

@vishweshbankwar

Description

@vishweshbankwar

Unit tests validating the behavior (i.e. whether the output span will contain the exception event) was added in open-telemetry/opentelemetry-dotnet#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomp:instrumentation.httpThings related to OpenTelemetry.Instrumentation.Http

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions