dotnet / dotnet/aspnetcore

Support `connection_reset` with HTTP/1.1

Open
#58,885 0 comments 0 reactions 0 assignees View on GitHub
area-networking feature-kestrel
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

### Is there an existing issue for this?

- [x] 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 https://github.com/open-telemetry/semantic-conventions/pull/1548#discussion_r1833195641:

> 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.