Skip to content

Support connection_reset with HTTP/1.1 #58885

@JamesNK

Description

@JamesNK

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Kestrel metrics supports connection_reset error status for connections:

The connection was reset while there were active HTTP/2 or HTTP/3 streams on the connection.

However, there should be support for HTTP/1.1 request unexpectedly ending and causing this error.

Expected Behavior

@halter73 at open-telemetry/semantic-conventions#1548 (comment):

It feels like there ought to be an equivalent to this for HTTP/1.1, although looking at the code I see that there isn't right now. I know we ignore any non-user-canceled write errors, and ignore ConnectionResetException for HTTP/1.1 reads if they're between requests, but what if we get an exception like that while reading HTTP/1.1 request headers? Or mid request body? I know we'll call Log.RequestProcessingError with the exception, but it looks like it might be treated as a graceful ConnectionEndReason.TransportCompleted for open telemetry purposes.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-kestrel

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions