Skip to content
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

Add known Kestrel connection error types #1548

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

JamesNK
Copy link

@JamesNK JamesNK commented Nov 5, 2024

Changes

.NET 9 adds connection error reasons to Kestrel connection duration metric. This PR updates the spec with the known types.

Preview: https://github.com/JamesNK/semantic-conventions/blob/jamesnk/kestrel-error-reason/docs/dotnet/dotnet-kestrel-metrics.md#metric-kestrelconnectionduration (scroll down to error.type table)

Merge requirement checklist

@JamesNK JamesNK requested review from a team as code owners November 5, 2024 05:49
| `output_queue_size_exceeded` | The connection exceeded the output queue size and was closed with `INTERNAL_ERROR`. This can be caused by an excessive number of HTTP/2 stream resets. For more information, see [Microsoft Security Advisory CVE-2023-44487:](https://github.com/dotnet/runtime/issues/93303). | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `request_headers_timeout` | Request headers timed out while waiting for headers to be received after the request started. Configured by `KestrelServerLimits.RequestHeadersTimeout`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `response_content_length_mismatch` | The HTTP response body sent data that didn't match the response's `content-length` header. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `server_timeout` | The connection timed out with the `IConnectionTimeoutFeature`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically correct but not useful. What timeouts signal this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's from here: https://github.com/dotnet/aspnetcore/blob/b7c8cf7506338b9cd5c4960bd99b03d190c3c805/src/Servers/Kestrel/Core/src/Internal/Infrastructure/TimeoutControl.cs#L312-L324

As far as I can tell nothing in aspnetcore calls IConnectionTimeoutFeature.SetTimeout. The API is there for apps to use.

How do you suggest the description is improved?

| `invalid_request_line` | The first line of an HTTP/1.1 request was invalid, potentially due to invalid content or exceeding the allowed limit. Configured by `KestrelServerLimits.MaxRequestLineSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `invalid_settings` | The connection received an HTTP/2 or HTTP/3 `SETTINGS` frame with invalid settings. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `invalid_stream_id` | An HTTP/2 stream with an invalid stream ID was received. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `invalid_window_update_size` | The server received an HTTP/2 `WINDOW_UPDATE` frame that caused a flow-control window to exceed the maximum size. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants