From 74c99647403a9ea5ed9a918f09d0d7a555d178ac Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 5 Nov 2024 13:47:58 +0800 Subject: [PATCH 01/14] Add known Kestrel connection error types --- docs/dotnet/dotnet-kestrel-metrics.md | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index 10d5866727..8905d978c8 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -138,6 +138,50 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | Value | Description | Stability | |---|---|---| +| `error_after_starting_response` | An error occured after the response was started causing an abort of the HTTP/1.1 connection, or multiplexed request stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `connection_reset` | The connection was reset while there are active HTTP/2 or HTTP/3 streams on the connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `flow_control_window_exceeded` | The client sent more data than was available in the flow-control window. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `keep_alive_timeout` | There was no activity on the connection and the keep alive timeout configured by `KestrelServerLimits.KeepAliveTimeout` was exceeded. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `insufficient_tls_version` | The connection doesn't have TLS 1.2 or greater required by HTTP/2. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_handshake` | Invalid HTTP/2 handshake received. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_stream_id` | HTTP/2 stream with an invalid stream ID received. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `frame_after_stream_close` | HTTP/2 frame received on a closed stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `unknown_stream` | HTTP/2 frame received on an unknown stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `unexpected_frame` | Unexpected HTTP/2 or HTTP/3 frame type received. The frame type is either unknown, unsupported, or invalid to received in the current stream state. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_frame_length` | HTTP/2 frame recevied with an invalid frame payload length. The frame could contain a payload that's not valid for the type, or a `DATA` frame payload doesn't match the length specified in the frame header. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_data_padding` | HTTP/2 `HEADER` or `DATA` frame has an invalid amount of padding. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_request_headers` | The HTTP request contains invalid request headers. This error can happen in a number of scenarios: A header could not be allowed by the HTTP protocol, such as a HTTP/2 request containing a pseudo-header in the `HEADERS` frame. Or a header could have an invalid value, such as a non-integer `content-length` value. Or a header name or value could contain invalid characters. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `stream_reset_limit_exceeded` | The connection received an excessive number of HTTP/2 stream resets and the connection was closed with `ENHANCE_YOUR_CALM`. 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) | +| `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) | +| `stream_self_dependency` | The connection received an HTTP/2 frame that caused a frame to depend on itself. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_settings` | The connection received an HTTP/2 or HTTP/3 `SETTINGS` frame that has invalid settings. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `missing_stream_end` | The connection received an HTTP/2 `HEADERS` frame for trailers without a stream end flag. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `max_frame_length_exceeded` | The connection received an HTTP/2 frame that exceeded the size limit specified by `Http2Limits.MaxFrameSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `error_reading_headers` | An error occured when decoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `error_writing_headers` | An error occured when encoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_http_version` | The connection received an HTTP request with the wrong version. For example, a browser sends an HTTP/1.1 request to a plain-text HTTP/2 connection. | ![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 has started. Configured by `KestrelServerLimits.RequestHeadersTimeout`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `min_request_body_data_rate` | Reading the request body timed out due to data arriving too slowly. Configured by `KestrelServerLimits.MinRequestBodyDataRate`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `min_response_data_rate` | Writing the response timed out because the response was not read by the client at the specified minimum data rate. Configured by `KestrelServerLimits.MinResponseDataRate`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `flow_control_queue_size_exceeded` | The connection exceeded the outgoing flow control maximum 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) | +| `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) | +| `closed_critical_stream` | A critical control stream for a HTTP/3 connection was closed. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aborted_by_app` | The HTTP/1.1 connection was aborted when app code aborted an HTTP request with `HttpContext.Abort()`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `write_canceled` | The cancellation of a response body write aborted the HTTP/1.1 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_body_reader_state` | Error when draining the request body aborted the HTTP/1.1 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `server_timeout` | Connection timed out with the `IConnectionTimeoutFeature`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `stream_creation_error` | The HTTP/3 connection received a stream that it won't accept. For example, the client creates duplicate control streams. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `io_error` | An `IOException` occured while a HTTP/2 or HTTP/3 connection is reading incoming data. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `app_shutdown_timeout` | The connection is abort during app shutdown. When app shutdown occurs the server stops accepting new connections and HTTP requests, and it is given time for active requests to complete. If the app shutdown timeout is exceed all remaining connections are aborted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `tls_handshake_failed` | An error occured during the TLS handshake for a connection. Only reported for HTTP/1.1 and HTTP/2 connections. TLS handshake for HTTP/3 in internal to QUIC transport. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_request_line` | The first line of an HTTP/1.1 request was invalid. This could be caused by invalid content or the request line exceeding the allowed limit. Configured by `KestrelServerLimits.MaxRequestLineSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `tls_not_supported` | TLS handshake received by an endpoint that doesn't support TLS. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `max_request_body_size_exceeded` | HTTP request body exceeds max request body size limit. Configured by `KestrelServerLimits.MaxRequestBodySize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `unexpected_end_of_request_content` | HTTP request body ended before the data specified by `content-length` was received. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `max_concurrent_connections_exceeded` | The connection exceeded the maximum concurrent connection limit. Configured by `KestrelServerLimits.MaxConcurrentConnections`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `max_request_headers_total_size_exceeded` | The HTTP request headers exceeded the maximum request headers total size. Configured by `KestrelServerLimits.MaxRequestHeadersTotalSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `max_request_header_count_exceeded` | The HTTP request headers exceeded the maximum request headers count. Configured by `KestrelServerLimits.MaxRequestHeaderCount`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `response_content_length_mismatch` | The HTTP response body sent data didn't match the response's `content-length` header. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. From 703cad5ed2b8fb8e15a2506e27129f2d1a7449ee Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 5 Nov 2024 14:23:24 +0800 Subject: [PATCH 02/14] Proof read --- docs/dotnet/dotnet-kestrel-metrics.md | 66 +++++++++++++-------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index 8905d978c8..400772cf2f 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -138,50 +138,50 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | Value | Description | Stability | |---|---|---| -| `error_after_starting_response` | An error occured after the response was started causing an abort of the HTTP/1.1 connection, or multiplexed request stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `connection_reset` | The connection was reset while there are active HTTP/2 or HTTP/3 streams on the connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `error_after_starting_response` | An error occurred after the response was started, causing an abort of the HTTP/1.1 connection or multiplexed request stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `connection_reset` | The connection was reset while there were active HTTP/2 or HTTP/3 streams on the connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `flow_control_window_exceeded` | The client sent more data than was available in the flow-control window. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `keep_alive_timeout` | There was no activity on the connection and the keep alive timeout configured by `KestrelServerLimits.KeepAliveTimeout` was exceeded. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `insufficient_tls_version` | The connection doesn't have TLS 1.2 or greater required by HTTP/2. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_handshake` | Invalid HTTP/2 handshake received. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_stream_id` | HTTP/2 stream with an invalid stream ID received. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `frame_after_stream_close` | HTTP/2 frame received on a closed stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `unknown_stream` | HTTP/2 frame received on an unknown stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `unexpected_frame` | Unexpected HTTP/2 or HTTP/3 frame type received. The frame type is either unknown, unsupported, or invalid to received in the current stream state. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_frame_length` | HTTP/2 frame recevied with an invalid frame payload length. The frame could contain a payload that's not valid for the type, or a `DATA` frame payload doesn't match the length specified in the frame header. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_data_padding` | HTTP/2 `HEADER` or `DATA` frame has an invalid amount of padding. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_request_headers` | The HTTP request contains invalid request headers. This error can happen in a number of scenarios: A header could not be allowed by the HTTP protocol, such as a HTTP/2 request containing a pseudo-header in the `HEADERS` frame. Or a header could have an invalid value, such as a non-integer `content-length` value. Or a header name or value could contain invalid characters. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `stream_reset_limit_exceeded` | The connection received an excessive number of HTTP/2 stream resets and the connection was closed with `ENHANCE_YOUR_CALM`. 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) | +| `keep_alive_timeout` | There was no activity on the connection, and the keep-alive timeout configured by `KestrelServerLimits.KeepAliveTimeout` was exceeded. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `insufficient_tls_version` | The connection doesn't have TLS 1.2 or greater, as required by HTTP/2. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_handshake` | An invalid HTTP/2 handshake was received. | ![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) | +| `frame_after_stream_close` | An HTTP/2 frame was received on a closed stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `unknown_stream` | An HTTP/2 frame was received on an unknown stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `unexpected_frame` | An unexpected HTTP/2 or HTTP/3 frame type was received. The frame type is either unknown, unsupported, or invalid for the current stream state. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_frame_length` | An HTTP/2 frame was received with an invalid frame payload length. The frame could contain a payload that is not valid for the type, or a `DATA` frame payload does not match the length specified in the frame header. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_data_padding` | An HTTP/2 `HEADER` or `DATA` frame has an invalid amount of padding. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_request_headers` | The HTTP request contains invalid headers. This error can occur in a number of scenarios: a header might not be allowed by the HTTP protocol, such as a pseudo-header in the `HEADERS` frame of an HTTP/2 request. A header could also have an invalid value, such as a non-integer `content-length`, or a header name or value might contain invalid characters. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `stream_reset_limit_exceeded` | The connection received an excessive number of HTTP/2 stream resets and was closed with `ENHANCE_YOUR_CALM`. 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) | | `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) | | `stream_self_dependency` | The connection received an HTTP/2 frame that caused a frame to depend on itself. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_settings` | The connection received an HTTP/2 or HTTP/3 `SETTINGS` frame that has invalid settings. | ![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) | | `missing_stream_end` | The connection received an HTTP/2 `HEADERS` frame for trailers without a stream end flag. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `max_frame_length_exceeded` | The connection received an HTTP/2 frame that exceeded the size limit specified by `Http2Limits.MaxFrameSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `error_reading_headers` | An error occured when decoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `error_writing_headers` | An error occured when encoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `error_reading_headers` | An error occurred when decoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `error_writing_headers` | An error occurred when encoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `invalid_http_version` | The connection received an HTTP request with the wrong version. For example, a browser sends an HTTP/1.1 request to a plain-text HTTP/2 connection. | ![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 has started. Configured by `KestrelServerLimits.RequestHeadersTimeout`. | ![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) | | `min_request_body_data_rate` | Reading the request body timed out due to data arriving too slowly. Configured by `KestrelServerLimits.MinRequestBodyDataRate`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `min_response_data_rate` | Writing the response timed out because the response was not read by the client at the specified minimum data rate. Configured by `KestrelServerLimits.MinResponseDataRate`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `flow_control_queue_size_exceeded` | The connection exceeded the outgoing flow control maximum 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) | +| `min_response_data_rate` | Writing the response timed out because the client did not read it at the specified minimum data rate. Configured by `KestrelServerLimits.MinResponseDataRate`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `flow_control_queue_size_exceeded` |The connection exceeded the outgoing flow control maximum 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) | | `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) | -| `closed_critical_stream` | A critical control stream for a HTTP/3 connection was closed. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `closed_critical_stream` | A critical control stream for an HTTP/3 connection was closed. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `aborted_by_app` | The HTTP/1.1 connection was aborted when app code aborted an HTTP request with `HttpContext.Abort()`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `write_canceled` | The cancellation of a response body write aborted the HTTP/1.1 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_body_reader_state` | Error when draining the request body aborted the HTTP/1.1 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `server_timeout` | Connection timed out with the `IConnectionTimeoutFeature`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `stream_creation_error` | The HTTP/3 connection received a stream that it won't accept. For example, the client creates duplicate control streams. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `io_error` | An `IOException` occured while a HTTP/2 or HTTP/3 connection is reading incoming data. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `app_shutdown_timeout` | The connection is abort during app shutdown. When app shutdown occurs the server stops accepting new connections and HTTP requests, and it is given time for active requests to complete. If the app shutdown timeout is exceed all remaining connections are aborted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `tls_handshake_failed` | An error occured during the TLS handshake for a connection. Only reported for HTTP/1.1 and HTTP/2 connections. TLS handshake for HTTP/3 in internal to QUIC transport. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_request_line` | The first line of an HTTP/1.1 request was invalid. This could be caused by invalid content or the request line exceeding the allowed limit. Configured by `KestrelServerLimits.MaxRequestLineSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `tls_not_supported` | TLS handshake received by an endpoint that doesn't support TLS. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `max_request_body_size_exceeded` | HTTP request body exceeds max request body size limit. Configured by `KestrelServerLimits.MaxRequestBodySize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `unexpected_end_of_request_content` | HTTP request body ended before the data specified by `content-length` was received. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_body_reader_state` | An error occurred when draining the request body, aborting the HTTP/1.1 connection. | ![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) | +| `stream_creation_error` | The HTTP/3 connection received a stream that it wouldn't accept. For example, the client created duplicate control streams. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `io_error` | An `IOException` occurred while an HTTP/2 or HTTP/3 connection was reading incoming data. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `app_shutdown_timeout` | The connection was aborted during app shutdown. During shutdown, the server stops accepting new connections and HTTP requests, and it is given time for active requests to complete. If the app shutdown timeout is exceeded, all remaining connections are aborted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `tls_handshake_failed` | An error occurred during the TLS handshake for a connection. Only reported for HTTP/1.1 and HTTP/2 connections. The TLS handshake for HTTP/3 is internal to QUIC transport. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `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) | +| `tls_not_supported` | A TLS handshake was received by an endpoint that isn't configured to support TLS. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `max_request_body_size_exceeded` | The HTTP request body exceeded the maximum request body size limit. Configured by `KestrelServerLimits.MaxRequestBodySize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `unexpected_end_of_request_content` | The HTTP request body ended before the data specified by `content-length` was received. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `max_concurrent_connections_exceeded` | The connection exceeded the maximum concurrent connection limit. Configured by `KestrelServerLimits.MaxConcurrentConnections`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `max_request_headers_total_size_exceeded` | The HTTP request headers exceeded the maximum request headers total size. Configured by `KestrelServerLimits.MaxRequestHeadersTotalSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `max_request_header_count_exceeded` | The HTTP request headers exceeded the maximum request headers count. Configured by `KestrelServerLimits.MaxRequestHeaderCount`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `response_content_length_mismatch` | The HTTP response body sent data didn't match the response's `content-length` header. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `max_request_headers_total_size_exceeded` | The HTTP request headers exceeded the maximum total size limit. Configured by `KestrelServerLimits.MaxRequestHeadersTotalSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `max_request_header_count_exceeded` | The HTTP request headers exceeded the maximum count limit. Configured by `KestrelServerLimits.MaxRequestHeaderCount`. | ![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) | | `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. From 810c1d9ae4fd521043030f4ddac619a633396ed6 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 5 Nov 2024 15:03:53 +0800 Subject: [PATCH 03/14] Sort --- docs/dotnet/dotnet-kestrel-metrics.md | 128 +++++++++++++------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index 400772cf2f..70c6eb7c62 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -39,13 +39,13 @@ In case instrumentation does not recognize `EndPoint` implementation, it sets th -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.active_connections` | UpDownCounter | `{connection}` | Number of connections that are currently active on the server. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `unix` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | `Recommended` if the transport is `tcp` or `udp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -66,7 +66,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -76,7 +76,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -99,13 +99,13 @@ of `[ 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300 ]`. -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.connection.duration` | Histogram | `s` | The duration of connections on the server. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`error.type`](/docs/attributes-registry/error.md) | string | The full name of exception type. [1] | `System.OperationCanceledException`; `Contoso.MyException` | `Conditionally Required` if and only if an error has occurred. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.protocol.name`](/docs/attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [2] | `http`; `web_sockets` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -136,57 +136,57 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| -| `error_after_starting_response` | An error occurred after the response was started, causing an abort of the HTTP/1.1 connection or multiplexed request stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `aborted_by_app` | The HTTP/1.1 connection was aborted when app code aborted an HTTP request with `HttpContext.Abort()`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `app_shutdown_timeout` | The connection was aborted during app shutdown. During shutdown, the server stops accepting new connections and HTTP requests, and it is given time for active requests to complete. If the app shutdown timeout is exceeded, all remaining connections are aborted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `closed_critical_stream` | A critical control stream for an HTTP/3 connection was closed. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `connection_reset` | The connection was reset while there were active HTTP/2 or HTTP/3 streams on the connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `error_after_starting_response` | An error occurred after the response was started, causing an abort of the HTTP/1.1 connection or multiplexed request stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `error_reading_headers` | An error occurred when decoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `error_writing_headers` | An error occurred when encoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `flow_control_queue_size_exceeded` | The connection exceeded the outgoing flow control maximum 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) | | `flow_control_window_exceeded` | The client sent more data than was available in the flow-control window. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `keep_alive_timeout` | There was no activity on the connection, and the keep-alive timeout configured by `KestrelServerLimits.KeepAliveTimeout` was exceeded. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `insufficient_tls_version` | The connection doesn't have TLS 1.2 or greater, as required by HTTP/2. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_handshake` | An invalid HTTP/2 handshake was received. | ![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) | | `frame_after_stream_close` | An HTTP/2 frame was received on a closed stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `unknown_stream` | An HTTP/2 frame was received on an unknown stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `unexpected_frame` | An unexpected HTTP/2 or HTTP/3 frame type was received. The frame type is either unknown, unsupported, or invalid for the current stream state. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_frame_length` | An HTTP/2 frame was received with an invalid frame payload length. The frame could contain a payload that is not valid for the type, or a `DATA` frame payload does not match the length specified in the frame header. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `insufficient_tls_version` | The connection doesn't have TLS 1.2 or greater, as required by HTTP/2. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_body_reader_state` | An error occurred when draining the request body, aborting the HTTP/1.1 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `invalid_data_padding` | An HTTP/2 `HEADER` or `DATA` frame has an invalid amount of padding. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_frame_length` | An HTTP/2 frame was received with an invalid frame payload length. The frame could contain a payload that is not valid for the type, or a `DATA` frame payload does not match the length specified in the frame header. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_handshake` | An invalid HTTP/2 handshake was received. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_http_version` | The connection received an HTTP request with the wrong version. For example, a browser sends an HTTP/1.1 request to a plain-text HTTP/2 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `invalid_request_headers` | The HTTP request contains invalid headers. This error can occur in a number of scenarios: a header might not be allowed by the HTTP protocol, such as a pseudo-header in the `HEADERS` frame of an HTTP/2 request. A header could also have an invalid value, such as a non-integer `content-length`, or a header name or value might contain invalid characters. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `stream_reset_limit_exceeded` | The connection received an excessive number of HTTP/2 stream resets and was closed with `ENHANCE_YOUR_CALM`. 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) | -| `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) | -| `stream_self_dependency` | The connection received an HTTP/2 frame that caused a frame to depend on itself. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `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) | -| `missing_stream_end` | The connection received an HTTP/2 `HEADERS` frame for trailers without a stream end flag. | ![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) | +| `io_error` | An `IOException` occurred while an HTTP/2 or HTTP/3 connection was reading incoming data. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `keep_alive_timeout` | There was no activity on the connection, and the keep-alive timeout configured by `KestrelServerLimits.KeepAliveTimeout` was exceeded. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `max_concurrent_connections_exceeded` | The connection exceeded the maximum concurrent connection limit. Configured by `KestrelServerLimits.MaxConcurrentConnections`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `max_frame_length_exceeded` | The connection received an HTTP/2 frame that exceeded the size limit specified by `Http2Limits.MaxFrameSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `error_reading_headers` | An error occurred when decoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `error_writing_headers` | An error occurred when encoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_http_version` | The connection received an HTTP request with the wrong version. For example, a browser sends an HTTP/1.1 request to a plain-text HTTP/2 connection. | ![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) | +| `max_request_body_size_exceeded` | The HTTP request body exceeded the maximum request body size limit. Configured by `KestrelServerLimits.MaxRequestBodySize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `max_request_header_count_exceeded` | The HTTP request headers exceeded the maximum count limit. Configured by `KestrelServerLimits.MaxRequestHeaderCount`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `max_request_headers_total_size_exceeded` | The HTTP request headers exceeded the maximum total size limit. Configured by `KestrelServerLimits.MaxRequestHeadersTotalSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `min_request_body_data_rate` | Reading the request body timed out due to data arriving too slowly. Configured by `KestrelServerLimits.MinRequestBodyDataRate`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `min_response_data_rate` | Writing the response timed out because the client did not read it at the specified minimum data rate. Configured by `KestrelServerLimits.MinResponseDataRate`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `flow_control_queue_size_exceeded` |The connection exceeded the outgoing flow control maximum 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) | +| `missing_stream_end` | The connection received an HTTP/2 `HEADERS` frame for trailers without a stream end flag. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `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) | -| `closed_critical_stream` | A critical control stream for an HTTP/3 connection was closed. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `aborted_by_app` | The HTTP/1.1 connection was aborted when app code aborted an HTTP request with `HttpContext.Abort()`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `write_canceled` | The cancellation of a response body write aborted the HTTP/1.1 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_body_reader_state` | An error occurred when draining the request body, aborting the HTTP/1.1 connection. | ![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) | | `stream_creation_error` | The HTTP/3 connection received a stream that it wouldn't accept. For example, the client created duplicate control streams. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `io_error` | An `IOException` occurred while an HTTP/2 or HTTP/3 connection was reading incoming data. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `app_shutdown_timeout` | The connection was aborted during app shutdown. During shutdown, the server stops accepting new connections and HTTP requests, and it is given time for active requests to complete. If the app shutdown timeout is exceeded, all remaining connections are aborted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `tls_handshake_failed` | An error occurred during the TLS handshake for a connection. Only reported for HTTP/1.1 and HTTP/2 connections. The TLS handshake for HTTP/3 is internal to QUIC transport. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `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) | +| `stream_reset_limit_exceeded` | The connection received an excessive number of HTTP/2 stream resets and was closed with `ENHANCE_YOUR_CALM`. 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) | +| `stream_self_dependency` | The connection received an HTTP/2 frame that caused a frame to depend on itself. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `tls_handshake_failed` | An error occurred during the TLS handshake for a connection. Only reported for HTTP/1.1 and HTTP/2 connections. The TLS handshake for HTTP/3 is internal to QUIC transport. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `tls_not_supported` | A TLS handshake was received by an endpoint that isn't configured to support TLS. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `max_request_body_size_exceeded` | The HTTP request body exceeded the maximum request body size limit. Configured by `KestrelServerLimits.MaxRequestBodySize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `unexpected_end_of_request_content` | The HTTP request body ended before the data specified by `content-length` was received. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `max_concurrent_connections_exceeded` | The connection exceeded the maximum concurrent connection limit. Configured by `KestrelServerLimits.MaxConcurrentConnections`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `max_request_headers_total_size_exceeded` | The HTTP request headers exceeded the maximum total size limit. Configured by `KestrelServerLimits.MaxRequestHeadersTotalSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `max_request_header_count_exceeded` | The HTTP request headers exceeded the maximum count limit. Configured by `KestrelServerLimits.MaxRequestHeaderCount`. | ![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) | +| `unexpected_frame` | An unexpected HTTP/2 or HTTP/3 frame type was received. The frame type is either unknown, unsupported, or invalid for the current stream state. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `unknown_stream` | An HTTP/2 frame was received on an unknown stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `write_canceled` | The cancellation of a response body write aborted the HTTP/1.1 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -196,7 +196,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -215,14 +215,14 @@ different processes could be listening on TCP port 12345 and UDP port 12345. -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.rejected_connections` | Counter | `{connection}` | Number of connections rejected by the server. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Connections are rejected when the currently active count exceeds the value configured with `MaxConcurrentConnections`. Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `unix` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | `Recommended` if the transport is `tcp` or `udp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -243,7 +243,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -253,7 +253,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -272,13 +272,13 @@ different processes could be listening on TCP port 12345 and UDP port 12345. -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.queued_connections` | UpDownCounter | `{connection}` | Number of connections that are currently queued and are waiting to start. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `unix` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | `Recommended` if the transport is `tcp` or `udp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -299,7 +299,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -309,7 +309,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -328,13 +328,13 @@ different processes could be listening on TCP port 12345 and UDP port 12345. -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.queued_requests` | UpDownCounter | `{request}` | Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.protocol.name`](/docs/attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [1] | `http`; `web_sockets` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.protocol.version`](/docs/attributes-registry/network.md) | string | The actual version of the protocol used for network communication. [2] | `1.1`; `2` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -361,7 +361,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -371,7 +371,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -390,7 +390,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.upgraded_connections` | UpDownCounter | `{connection}` | Number of connections that are currently upgraded (WebSockets). . [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -398,7 +398,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `unix` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | `Recommended` if the transport is `tcp` or `udp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -419,7 +419,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -429,7 +429,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -452,13 +452,13 @@ of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.tls_handshake.duration` | Histogram | `s` | The duration of TLS handshakes on the server. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`error.type`](/docs/attributes-registry/error.md) | string | The full name of exception type. [1] | `System.OperationCanceledException`; `Contoso.MyException` | `Conditionally Required` if and only if an error has occurred. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [2] | `tcp`; `unix` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -483,13 +483,13 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -499,7 +499,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -518,13 +518,13 @@ different processes could be listening on TCP port 12345 and UDP port 12345. -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.active_tls_handshakes` | UpDownCounter | `{handshake}` | Number of TLS handshakes that are currently in progress on the server. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `unix` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | `Recommended` if the transport is `tcp` or `udp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -545,7 +545,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -555,7 +555,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | From df354e734be2efb98b076e64d76f99c10f9f76cd Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 5 Nov 2024 15:04:52 +0800 Subject: [PATCH 04/14] Clean up --- docs/dotnet/dotnet-kestrel-metrics.md | 67 +++++++++++++-------------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index 70c6eb7c62..9f17a35778 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -39,13 +39,13 @@ In case instrumentation does not recognize `EndPoint` implementation, it sets th -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.active_connections` | UpDownCounter | `{connection}` | Number of connections that are currently active on the server. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `unix` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | `Recommended` if the transport is `tcp` or `udp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -66,7 +66,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -76,7 +76,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -99,13 +99,13 @@ of `[ 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300 ]`. -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.connection.duration` | Histogram | `s` | The duration of connections on the server. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`error.type`](/docs/attributes-registry/error.md) | string | The full name of exception type. [1] | `System.OperationCanceledException`; `Contoso.MyException` | `Conditionally Required` if and only if an error has occurred. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.protocol.name`](/docs/attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [2] | `http`; `web_sockets` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -183,10 +183,9 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | `unknown_stream` | An HTTP/2 frame was received on an unknown stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `write_canceled` | The cancellation of a response body write aborted the HTTP/1.1 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | - `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -196,7 +195,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -215,14 +214,14 @@ different processes could be listening on TCP port 12345 and UDP port 12345. -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.rejected_connections` | Counter | `{connection}` | Number of connections rejected by the server. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Connections are rejected when the currently active count exceeds the value configured with `MaxConcurrentConnections`. Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `unix` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | `Recommended` if the transport is `tcp` or `udp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -243,7 +242,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -253,7 +252,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -272,13 +271,13 @@ different processes could be listening on TCP port 12345 and UDP port 12345. -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.queued_connections` | UpDownCounter | `{connection}` | Number of connections that are currently queued and are waiting to start. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `unix` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | `Recommended` if the transport is `tcp` or `udp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -299,7 +298,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -309,7 +308,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -328,13 +327,13 @@ different processes could be listening on TCP port 12345 and UDP port 12345. -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.queued_requests` | UpDownCounter | `{request}` | Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.protocol.name`](/docs/attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [1] | `http`; `web_sockets` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.protocol.version`](/docs/attributes-registry/network.md) | string | The actual version of the protocol used for network communication. [2] | `1.1`; `2` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -361,7 +360,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -371,7 +370,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -390,7 +389,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.upgraded_connections` | UpDownCounter | `{connection}` | Number of connections that are currently upgraded (WebSockets). . [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -398,7 +397,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `unix` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | `Recommended` if the transport is `tcp` or `udp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -419,7 +418,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -429,7 +428,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -452,13 +451,13 @@ of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.tls_handshake.duration` | Histogram | `s` | The duration of TLS handshakes on the server. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`error.type`](/docs/attributes-registry/error.md) | string | The full name of exception type. [1] | `System.OperationCanceledException`; `Contoso.MyException` | `Conditionally Required` if and only if an error has occurred. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [2] | `tcp`; `unix` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -483,13 +482,13 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -499,7 +498,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -518,13 +517,13 @@ different processes could be listening on TCP port 12345 and UDP port 12345. -| Name | Instrument Type | Unit (UCUM) | Description | Stability | +| Name | Instrument Type | Unit (UCUM) | Description | Stability | | -------- | --------------- | ----------- | -------------- | --------- | | `kestrel.active_tls_handshakes` | UpDownCounter | `{handshake}` | Number of TLS handshakes that are currently in progress on the server. [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | **[1]:** Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 -| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | |---|---|---|---|---|---| | [`network.transport`](/docs/attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [1] | `tcp`; `unix` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`network.type`](/docs/attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [2] | `ipv4`; `ipv6` | `Recommended` if the transport is `tcp` or `udp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | @@ -545,7 +544,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `pipe` | Named or anonymous pipe. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `quic` | QUIC | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -555,7 +554,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `network.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `ipv4` | IPv4 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | `ipv6` | IPv6 | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | From 39fd16341612bbc67608268a6754f20457229963 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 5 Nov 2024 15:05:24 +0800 Subject: [PATCH 05/14] Clean up --- docs/dotnet/dotnet-kestrel-metrics.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index 9f17a35778..e1245ceeba 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -136,7 +136,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. `error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. -| Value | Description | Stability | +| Value | Description | Stability | |---|---|---| | `aborted_by_app` | The HTTP/1.1 connection was aborted when app code aborted an HTTP request with `HttpContext.Abort()`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `app_shutdown_timeout` | The connection was aborted during app shutdown. During shutdown, the server stops accepting new connections and HTTP requests, and it is given time for active requests to complete. If the app shutdown timeout is exceeded, all remaining connections are aborted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -183,6 +183,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | `unknown_stream` | An HTTP/2 frame was received on an unknown stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `write_canceled` | The cancellation of a response body write aborted the HTTP/1.1 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | + `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | Value | Description | Stability | From c91616641b549807f505b7d4a0f01d2a7e43754e Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Wed, 6 Nov 2024 07:25:37 +0800 Subject: [PATCH 06/14] Apply suggestions from code review Co-authored-by: Chris Ross --- docs/dotnet/dotnet-kestrel-metrics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index e1245ceeba..89d6919f7e 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -146,7 +146,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | `error_reading_headers` | An error occurred when decoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `error_writing_headers` | An error occurred when encoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `flow_control_queue_size_exceeded` | The connection exceeded the outgoing flow control maximum 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) | -| `flow_control_window_exceeded` | The client sent more data than was available in the flow-control window. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `flow_control_window_exceeded` | The client sent more data than allowed by the current flow-control window. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `frame_after_stream_close` | An HTTP/2 frame was received on a closed stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `insufficient_tls_version` | The connection doesn't have TLS 1.2 or greater, as required by HTTP/2. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `invalid_body_reader_state` | An error occurred when draining the request body, aborting the HTTP/1.1 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | From e2aee17e21ca66a3d67cecc28486399324950789 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Wed, 6 Nov 2024 07:28:21 +0800 Subject: [PATCH 07/14] PR feedback --- docs/dotnet/dotnet-kestrel-metrics.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index 89d6919f7e..2d1a50dc47 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -158,8 +158,8 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | `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) | -| `io_error` | An `IOException` occurred while an HTTP/2 or HTTP/3 connection was reading incoming data. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `invalid_window_update_size` | The server received an HTTP/2 `WINDOW_UPDATE` frame with a zero increment, or an increment that caused a flow-control window to exceed the maximum size. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `io_error` | An `IOException` occurred while reading or writing connection data. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `keep_alive_timeout` | There was no activity on the connection, and the keep-alive timeout configured by `KestrelServerLimits.KeepAliveTimeout` was exceeded. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `max_concurrent_connections_exceeded` | The connection exceeded the maximum concurrent connection limit. Configured by `KestrelServerLimits.MaxConcurrentConnections`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `max_frame_length_exceeded` | The connection received an HTTP/2 frame that exceeded the size limit specified by `Http2Limits.MaxFrameSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | From cc73ef6285b8b61f891b43bfed4ab47347c2bfa9 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Wed, 6 Nov 2024 08:06:44 +0800 Subject: [PATCH 08/14] Improve --- docs/dotnet/dotnet-kestrel-metrics.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index 2d1a50dc47..af7dccbc72 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -145,7 +145,7 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | `error_after_starting_response` | An error occurred after the response was started, causing an abort of the HTTP/1.1 connection or multiplexed request stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `error_reading_headers` | An error occurred when decoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `error_writing_headers` | An error occurred when encoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `flow_control_queue_size_exceeded` | The connection exceeded the outgoing flow control maximum 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) | +| `flow_control_queue_size_exceeded` | The connection exceeded the outgoing flow control maximum 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) | | `flow_control_window_exceeded` | The client sent more data than allowed by the current flow-control window. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `frame_after_stream_close` | An HTTP/2 frame was received on a closed stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `insufficient_tls_version` | The connection doesn't have TLS 1.2 or greater, as required by HTTP/2. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | @@ -169,12 +169,12 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | `min_request_body_data_rate` | Reading the request body timed out due to data arriving too slowly. Configured by `KestrelServerLimits.MinRequestBodyDataRate`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `min_response_data_rate` | Writing the response timed out because the client did not read it at the specified minimum data rate. Configured by `KestrelServerLimits.MinResponseDataRate`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `missing_stream_end` | The connection received an HTTP/2 `HEADERS` frame for trailers without a stream end flag. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `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) | +| `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) | | `stream_creation_error` | The HTTP/3 connection received a stream that it wouldn't accept. For example, the client created duplicate control streams. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `stream_reset_limit_exceeded` | The connection received an excessive number of HTTP/2 stream resets and was closed with `ENHANCE_YOUR_CALM`. 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) | +| `stream_reset_limit_exceeded` | The connection received an excessive number of HTTP/2 stream resets and was closed with `ENHANCE_YOUR_CALM`. 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) | | `stream_self_dependency` | The connection received an HTTP/2 frame that caused a frame to depend on itself. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `tls_handshake_failed` | An error occurred during the TLS handshake for a connection. Only reported for HTTP/1.1 and HTTP/2 connections. The TLS handshake for HTTP/3 is internal to QUIC transport. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `tls_not_supported` | A TLS handshake was received by an endpoint that isn't configured to support TLS. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | From f21dbc2cae73f86e892db4e9f452282d45fd6628 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 12 Nov 2024 11:21:31 +0800 Subject: [PATCH 09/14] PR feedback --- docs/dotnet/dotnet-kestrel-metrics.md | 98 ++++++++++++++------------- model/kestrel/metrics.yaml | 55 ++++++++++++++- 2 files changed, 106 insertions(+), 47 deletions(-) diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index af7dccbc72..c5e53fa7e1 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -116,7 +116,57 @@ of `[ 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300 ]`. | [`server.port`](/docs/attributes-registry/server.md) | int | Server port number. [7] | `80`; `8080`; `443` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | | [`tls.protocol.version`](/docs/attributes-registry/tls.md) | string | Numeric part of the version parsed from the original string of the negotiated [SSL/TLS protocol version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) | `1.2`; `3` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -**[1]:** Captures the exception type when a connection fails. +**[1]:** Starting from .NET 9, Kestrel `kestrel.connection.duration` metric reports +the following errors types when a corresponding error occurs: + +| Value | Description | Stability | +|---|---|---| +| `aborted_by_app` | The HTTP/1.1 connection was aborted when app code aborted an HTTP request with `HttpContext.Abort()`. | +| `app_shutdown_timeout` | The connection was aborted during app shutdown. During shutdown, the server stops accepting new connections and HTTP requests, and it is given time for active requests to complete. If the app shutdown timeout is exceeded, all remaining connections are aborted. | +| `closed_critical_stream` | A critical control stream for an HTTP/3 connection was closed. | +| `connection_reset` | The connection was reset while there were active HTTP/2 or HTTP/3 streams on the connection. | +| `error_after_starting_response` | An error occurred after the response was started, causing an abort of the HTTP/1.1 connection or multiplexed request stream. | +| `error_reading_headers` | An error occurred when decoding HPACK headers in an HTTP/2 `HEADERS` frame. | +| `error_writing_headers` | An error occurred when encoding HPACK headers in an HTTP/2 `HEADERS` frame. | +| `flow_control_queue_size_exceeded` | The connection exceeded the outgoing flow control maximum 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). | +| `flow_control_window_exceeded` | The client sent more data than allowed by the current flow-control window. | +| `frame_after_stream_close` | An HTTP/2 frame was received on a closed stream. | +| `insufficient_tls_version` | The connection doesn't have TLS 1.2 or greater, as required by HTTP/2. | +| `invalid_body_reader_state` | An error occurred when draining the request body, aborting the HTTP/1.1 connection. | +| `invalid_data_padding` | An HTTP/2 `HEADER` or `DATA` frame has an invalid amount of padding. | +| `invalid_frame_length` | An HTTP/2 frame was received with an invalid frame payload length. The frame could contain a payload that is not valid for the type, or a `DATA` frame payload does not match the length specified in the frame header. | +| `invalid_handshake` | An invalid HTTP/2 handshake was received. | +| `invalid_http_version` | The connection received an HTTP request with the wrong version. For example, a browser sends an HTTP/1.1 request to a plain-text HTTP/2 connection. | +| `invalid_request_headers` | The HTTP request contains invalid headers. This error can occur in a number of scenarios: a header might not be allowed by the HTTP protocol, such as a pseudo-header in the `HEADERS` frame of an HTTP/2 request. A header could also have an invalid value, such as a non-integer `content-length`, or a header name or value might contain invalid characters. | +| `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`. | +| `invalid_settings` | The connection received an HTTP/2 or HTTP/3 `SETTINGS` frame with invalid settings. | +| `invalid_stream_id` | An HTTP/2 stream with an invalid stream ID was received. | +| `invalid_window_update_size` | The server received an HTTP/2 `WINDOW_UPDATE` frame with a zero increment, or an increment that caused a flow-control window to exceed the maximum size. | +| `io_error` | An `IOException` occurred while reading or writing connection data. | +| `keep_alive_timeout` | There was no activity on the connection, and the keep-alive timeout configured by `KestrelServerLimits.KeepAliveTimeout` was exceeded. | +| `max_concurrent_connections_exceeded` | The connection exceeded the maximum concurrent connection limit. Configured by `KestrelServerLimits.MaxConcurrentConnections`. | +| `max_frame_length_exceeded` | The connection received an HTTP/2 frame that exceeded the size limit specified by `Http2Limits.MaxFrameSize`. | +| `max_request_body_size_exceeded` | The HTTP request body exceeded the maximum request body size limit. Configured by `KestrelServerLimits.MaxRequestBodySize`. | +| `max_request_header_count_exceeded` | The HTTP request headers exceeded the maximum count limit. Configured by `KestrelServerLimits.MaxRequestHeaderCount`. | +| `max_request_headers_total_size_exceeded` | The HTTP request headers exceeded the maximum total size limit. Configured by `KestrelServerLimits.MaxRequestHeadersTotalSize`. | +| `min_request_body_data_rate` | Reading the request body timed out due to data arriving too slowly. Configured by `KestrelServerLimits.MinRequestBodyDataRate`. | +| `min_response_data_rate` | Writing the response timed out because the client did not read it at the specified minimum data rate. Configured by `KestrelServerLimits.MinResponseDataRate`. | +| `missing_stream_end` | The connection received an HTTP/2 `HEADERS` frame for trailers without a stream end flag. | +| `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). | +| `request_headers_timeout` | Request headers timed out while waiting for headers to be received after the request started. Configured by `KestrelServerLimits.RequestHeadersTimeout`. | +| `response_content_length_mismatch` | The HTTP response body sent data that didn't match the response's `content-length` header. | +| `server_timeout` | The connection timed out with the `IConnectionTimeoutFeature`. | +| `stream_creation_error` | The HTTP/3 connection received a stream that it wouldn't accept. For example, the client created duplicate control streams. | +| `stream_reset_limit_exceeded` | The connection received an excessive number of HTTP/2 stream resets and was closed with `ENHANCE_YOUR_CALM`. For more information, see [Microsoft Security Advisory CVE-2023-44487](https://github.com/dotnet/runtime/issues/93303). | +| `stream_self_dependency` | The connection received an HTTP/2 frame that caused a frame to depend on itself. | +| `tls_handshake_failed` | An error occurred during the TLS handshake for a connection. Only reported for HTTP/1.1 and HTTP/2 connections. The TLS handshake for HTTP/3 is internal to QUIC transport. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | +| `tls_not_supported` | A TLS handshake was received by an endpoint that isn't configured to support TLS. | +| `unexpected_end_of_request_content` | The HTTP request body ended before the data specified by `content-length` was received. | +| `unexpected_frame` | An unexpected HTTP/2 or HTTP/3 frame type was received. The frame type is either unknown, unsupported, or invalid for the current stream state. | +| `unknown_stream` | An HTTP/2 frame was received on an unknown stream. | +| `write_canceled` | The cancellation of a response body write aborted the HTTP/1.1 connection. | + +In other cases, `error.type` contains the fully qualified type name of the exception. **[2]:** The value SHOULD be normalized to lowercase. @@ -138,50 +188,6 @@ different processes could be listening on TCP port 12345 and UDP port 12345. | Value | Description | Stability | |---|---|---| -| `aborted_by_app` | The HTTP/1.1 connection was aborted when app code aborted an HTTP request with `HttpContext.Abort()`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `app_shutdown_timeout` | The connection was aborted during app shutdown. During shutdown, the server stops accepting new connections and HTTP requests, and it is given time for active requests to complete. If the app shutdown timeout is exceeded, all remaining connections are aborted. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `closed_critical_stream` | A critical control stream for an HTTP/3 connection was closed. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `connection_reset` | The connection was reset while there were active HTTP/2 or HTTP/3 streams on the connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `error_after_starting_response` | An error occurred after the response was started, causing an abort of the HTTP/1.1 connection or multiplexed request stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `error_reading_headers` | An error occurred when decoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `error_writing_headers` | An error occurred when encoding HPACK headers in an HTTP/2 `HEADERS` frame. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `flow_control_queue_size_exceeded` | The connection exceeded the outgoing flow control maximum 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) | -| `flow_control_window_exceeded` | The client sent more data than allowed by the current flow-control window. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `frame_after_stream_close` | An HTTP/2 frame was received on a closed stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `insufficient_tls_version` | The connection doesn't have TLS 1.2 or greater, as required by HTTP/2. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_body_reader_state` | An error occurred when draining the request body, aborting the HTTP/1.1 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_data_padding` | An HTTP/2 `HEADER` or `DATA` frame has an invalid amount of padding. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_frame_length` | An HTTP/2 frame was received with an invalid frame payload length. The frame could contain a payload that is not valid for the type, or a `DATA` frame payload does not match the length specified in the frame header. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_handshake` | An invalid HTTP/2 handshake was received. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_http_version` | The connection received an HTTP request with the wrong version. For example, a browser sends an HTTP/1.1 request to a plain-text HTTP/2 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `invalid_request_headers` | The HTTP request contains invalid headers. This error can occur in a number of scenarios: a header might not be allowed by the HTTP protocol, such as a pseudo-header in the `HEADERS` frame of an HTTP/2 request. A header could also have an invalid value, such as a non-integer `content-length`, or a header name or value might contain invalid characters. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `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 with a zero increment, or an increment that caused a flow-control window to exceed the maximum size. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `io_error` | An `IOException` occurred while reading or writing connection data. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `keep_alive_timeout` | There was no activity on the connection, and the keep-alive timeout configured by `KestrelServerLimits.KeepAliveTimeout` was exceeded. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `max_concurrent_connections_exceeded` | The connection exceeded the maximum concurrent connection limit. Configured by `KestrelServerLimits.MaxConcurrentConnections`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `max_frame_length_exceeded` | The connection received an HTTP/2 frame that exceeded the size limit specified by `Http2Limits.MaxFrameSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `max_request_body_size_exceeded` | The HTTP request body exceeded the maximum request body size limit. Configured by `KestrelServerLimits.MaxRequestBodySize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `max_request_header_count_exceeded` | The HTTP request headers exceeded the maximum count limit. Configured by `KestrelServerLimits.MaxRequestHeaderCount`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `max_request_headers_total_size_exceeded` | The HTTP request headers exceeded the maximum total size limit. Configured by `KestrelServerLimits.MaxRequestHeadersTotalSize`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `min_request_body_data_rate` | Reading the request body timed out due to data arriving too slowly. Configured by `KestrelServerLimits.MinRequestBodyDataRate`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `min_response_data_rate` | Writing the response timed out because the client did not read it at the specified minimum data rate. Configured by `KestrelServerLimits.MinResponseDataRate`. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `missing_stream_end` | The connection received an HTTP/2 `HEADERS` frame for trailers without a stream end flag. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `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) | -| `stream_creation_error` | The HTTP/3 connection received a stream that it wouldn't accept. For example, the client created duplicate control streams. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `stream_reset_limit_exceeded` | The connection received an excessive number of HTTP/2 stream resets and was closed with `ENHANCE_YOUR_CALM`. 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) | -| `stream_self_dependency` | The connection received an HTTP/2 frame that caused a frame to depend on itself. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `tls_handshake_failed` | An error occurred during the TLS handshake for a connection. Only reported for HTTP/1.1 and HTTP/2 connections. The TLS handshake for HTTP/3 is internal to QUIC transport. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `tls_not_supported` | A TLS handshake was received by an endpoint that isn't configured to support TLS. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `unexpected_end_of_request_content` | The HTTP request body ended before the data specified by `content-length` was received. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `unexpected_frame` | An unexpected HTTP/2 or HTTP/3 frame type was received. The frame type is either unknown, unsupported, or invalid for the current stream state. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `unknown_stream` | An HTTP/2 frame was received on an unknown stream. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | -| `write_canceled` | The cancellation of a response body write aborted the HTTP/1.1 connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) | `network.transport` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. @@ -565,4 +571,4 @@ different processes could be listening on TCP port 12345 and UDP port 12345. -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status +[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status \ No newline at end of file diff --git a/model/kestrel/metrics.yaml b/model/kestrel/metrics.yaml index 0d1499a34c..4bc6acf49a 100644 --- a/model/kestrel/metrics.yaml +++ b/model/kestrel/metrics.yaml @@ -44,7 +44,60 @@ groups: conditionally_required: if and only if an error has occurred. note: "Captures the exception type when a connection fails." examples: ['System.OperationCanceledException', 'Contoso.MyException'] + - ref: error.type + # TODO: move note to yaml once https://github.com/open-telemetry/build-tools/issues/192 is supported + note: | + Starting from .NET 9, Kestrel `kestrel.connection.duration` metric reports + the following errors types when a corresponding error occurs: + + | Value | Description | Stability | + |---|---|---| + | `aborted_by_app` | The HTTP/1.1 connection was aborted when app code aborted an HTTP request with `HttpContext.Abort()`. | + | `app_shutdown_timeout` | The connection was aborted during app shutdown. During shutdown, the server stops accepting new connections and HTTP requests, and it is given time for active requests to complete. If the app shutdown timeout is exceeded, all remaining connections are aborted. | + | `closed_critical_stream` | A critical control stream for an HTTP/3 connection was closed. | + | `connection_reset` | The connection was reset while there were active HTTP/2 or HTTP/3 streams on the connection. | + | `error_after_starting_response` | An error occurred after the response was started, causing an abort of the HTTP/1.1 connection or multiplexed request stream. | + | `error_reading_headers` | An error occurred when decoding HPACK headers in an HTTP/2 `HEADERS` frame. | + | `error_writing_headers` | An error occurred when encoding HPACK headers in an HTTP/2 `HEADERS` frame. | + | `flow_control_queue_size_exceeded` | The connection exceeded the outgoing flow control maximum 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). | + | `flow_control_window_exceeded` | The client sent more data than allowed by the current flow-control window. | + | `frame_after_stream_close` | An HTTP/2 frame was received on a closed stream. | + | `insufficient_tls_version` | The connection doesn't have TLS 1.2 or greater, as required by HTTP/2. | + | `invalid_body_reader_state` | An error occurred when draining the request body, aborting the HTTP/1.1 connection. | + | `invalid_data_padding` | An HTTP/2 `HEADER` or `DATA` frame has an invalid amount of padding. | + | `invalid_frame_length` | An HTTP/2 frame was received with an invalid frame payload length. The frame could contain a payload that is not valid for the type, or a `DATA` frame payload does not match the length specified in the frame header. | + | `invalid_handshake` | An invalid HTTP/2 handshake was received. | + | `invalid_http_version` | The connection received an HTTP request with the wrong version. For example, a browser sends an HTTP/1.1 request to a plain-text HTTP/2 connection. | + | `invalid_request_headers` | The HTTP request contains invalid headers. This error can occur in a number of scenarios: a header might not be allowed by the HTTP protocol, such as a pseudo-header in the `HEADERS` frame of an HTTP/2 request. A header could also have an invalid value, such as a non-integer `content-length`, or a header name or value might contain invalid characters. | + | `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`. | + | `invalid_settings` | The connection received an HTTP/2 or HTTP/3 `SETTINGS` frame with invalid settings. | + | `invalid_stream_id` | An HTTP/2 stream with an invalid stream ID was received. | + | `invalid_window_update_size` | The server received an HTTP/2 `WINDOW_UPDATE` frame with a zero increment, or an increment that caused a flow-control window to exceed the maximum size. | + | `io_error` | An `IOException` occurred while reading or writing connection data. | + | `keep_alive_timeout` | There was no activity on the connection, and the keep-alive timeout configured by `KestrelServerLimits.KeepAliveTimeout` was exceeded. | + | `max_concurrent_connections_exceeded` | The connection exceeded the maximum concurrent connection limit. Configured by `KestrelServerLimits.MaxConcurrentConnections`. | + | `max_frame_length_exceeded` | The connection received an HTTP/2 frame that exceeded the size limit specified by `Http2Limits.MaxFrameSize`. | + | `max_request_body_size_exceeded` | The HTTP request body exceeded the maximum request body size limit. Configured by `KestrelServerLimits.MaxRequestBodySize`. | + | `max_request_header_count_exceeded` | The HTTP request headers exceeded the maximum count limit. Configured by `KestrelServerLimits.MaxRequestHeaderCount`. | + | `max_request_headers_total_size_exceeded` | The HTTP request headers exceeded the maximum total size limit. Configured by `KestrelServerLimits.MaxRequestHeadersTotalSize`. | + | `min_request_body_data_rate` | Reading the request body timed out due to data arriving too slowly. Configured by `KestrelServerLimits.MinRequestBodyDataRate`. | + | `min_response_data_rate` | Writing the response timed out because the client did not read it at the specified minimum data rate. Configured by `KestrelServerLimits.MinResponseDataRate`. | + | `missing_stream_end` | The connection received an HTTP/2 `HEADERS` frame for trailers without a stream end flag. | + | `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). | + | `request_headers_timeout` | Request headers timed out while waiting for headers to be received after the request started. Configured by `KestrelServerLimits.RequestHeadersTimeout`. | + | `response_content_length_mismatch` | The HTTP response body sent data that didn't match the response's `content-length` header. | + | `server_timeout` | The connection timed out with the `IConnectionTimeoutFeature`. | + | `stream_creation_error` | The HTTP/3 connection received a stream that it wouldn't accept. For example, the client created duplicate control streams. | + | `stream_reset_limit_exceeded` | The connection received an excessive number of HTTP/2 stream resets and was closed with `ENHANCE_YOUR_CALM`. For more information, see [Microsoft Security Advisory CVE-2023-44487](https://github.com/dotnet/runtime/issues/93303). | + | `stream_self_dependency` | The connection received an HTTP/2 frame that caused a frame to depend on itself. | + | `tls_handshake_failed` | An error occurred during the TLS handshake for a connection. Only reported for HTTP/1.1 and HTTP/2 connections. The TLS handshake for HTTP/3 is internal to QUIC transport. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | + | `tls_not_supported` | A TLS handshake was received by an endpoint that isn't configured to support TLS. | + | `unexpected_end_of_request_content` | The HTTP request body ended before the data specified by `content-length` was received. | + | `unexpected_frame` | An unexpected HTTP/2 or HTTP/3 frame type was received. The frame type is either unknown, unsupported, or invalid for the current stream state. | + | `unknown_stream` | An HTTP/2 frame was received on an unknown stream. | + | `write_canceled` | The cancellation of a response body write aborted the HTTP/1.1 connection. | + In other cases, `error.type` contains the fully qualified type name of the exception. - id: metric.kestrel.rejected_connections type: metric metric_name: kestrel.rejected_connections @@ -125,4 +178,4 @@ groups: unit: "{handshake}" note: | Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 - extends: common.kestrel.attributes + extends: common.kestrel.attributes \ No newline at end of file From 50f8a47b6efad1430db0ec29162d4cebd3ecc1e1 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Tue, 12 Nov 2024 11:21:43 +0800 Subject: [PATCH 10/14] PR feedback --- docs/dotnet/dotnet-kestrel-metrics.md | 8 ++++---- model/kestrel/metrics.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index c5e53fa7e1..ad9f12cd0d 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -125,14 +125,14 @@ the following errors types when a corresponding error occurs: | `app_shutdown_timeout` | The connection was aborted during app shutdown. During shutdown, the server stops accepting new connections and HTTP requests, and it is given time for active requests to complete. If the app shutdown timeout is exceeded, all remaining connections are aborted. | | `closed_critical_stream` | A critical control stream for an HTTP/3 connection was closed. | | `connection_reset` | The connection was reset while there were active HTTP/2 or HTTP/3 streams on the connection. | -| `error_after_starting_response` | An error occurred after the response was started, causing an abort of the HTTP/1.1 connection or multiplexed request stream. | +| `error_after_starting_response` | An error such as an unhandled application exception or invalid request body occurred after the response was started, causing an abort of the HTTP/1.1 connection. | | `error_reading_headers` | An error occurred when decoding HPACK headers in an HTTP/2 `HEADERS` frame. | | `error_writing_headers` | An error occurred when encoding HPACK headers in an HTTP/2 `HEADERS` frame. | | `flow_control_queue_size_exceeded` | The connection exceeded the outgoing flow control maximum 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). | | `flow_control_window_exceeded` | The client sent more data than allowed by the current flow-control window. | | `frame_after_stream_close` | An HTTP/2 frame was received on a closed stream. | | `insufficient_tls_version` | The connection doesn't have TLS 1.2 or greater, as required by HTTP/2. | -| `invalid_body_reader_state` | An error occurred when draining the request body, aborting the HTTP/1.1 connection. | +| `invalid_body_reader_state` | An error occurred when draining the request body, aborting the HTTP/1.1 connection. This could be caused by app code reading the request body and missing a call to `PipeReader.AdvanceTo` in a finally block. | | `invalid_data_padding` | An HTTP/2 `HEADER` or `DATA` frame has an invalid amount of padding. | | `invalid_frame_length` | An HTTP/2 frame was received with an invalid frame payload length. The frame could contain a payload that is not valid for the type, or a `DATA` frame payload does not match the length specified in the frame header. | | `invalid_handshake` | An invalid HTTP/2 handshake was received. | @@ -142,7 +142,7 @@ the following errors types when a corresponding error occurs: | `invalid_settings` | The connection received an HTTP/2 or HTTP/3 `SETTINGS` frame with invalid settings. | | `invalid_stream_id` | An HTTP/2 stream with an invalid stream ID was received. | | `invalid_window_update_size` | The server received an HTTP/2 `WINDOW_UPDATE` frame with a zero increment, or an increment that caused a flow-control window to exceed the maximum size. | -| `io_error` | An `IOException` occurred while reading or writing connection data. | +| `io_error` | An `IOException` occurred while reading or writing HTTP/2 or HTTP/3 connection data. | | `keep_alive_timeout` | There was no activity on the connection, and the keep-alive timeout configured by `KestrelServerLimits.KeepAliveTimeout` was exceeded. | | `max_concurrent_connections_exceeded` | The connection exceeded the maximum concurrent connection limit. Configured by `KestrelServerLimits.MaxConcurrentConnections`. | | `max_frame_length_exceeded` | The connection received an HTTP/2 frame that exceeded the size limit specified by `Http2Limits.MaxFrameSize`. | @@ -161,7 +161,7 @@ the following errors types when a corresponding error occurs: | `stream_self_dependency` | The connection received an HTTP/2 frame that caused a frame to depend on itself. | | `tls_handshake_failed` | An error occurred during the TLS handshake for a connection. Only reported for HTTP/1.1 and HTTP/2 connections. The TLS handshake for HTTP/3 is internal to QUIC transport. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `tls_not_supported` | A TLS handshake was received by an endpoint that isn't configured to support TLS. | -| `unexpected_end_of_request_content` | The HTTP request body ended before the data specified by `content-length` was received. | +| `unexpected_end_of_request_content` | The HTTP/1.1 request body ended before the data specified by the `content-length` header or chunked transfer encoding mechanism was received. | | `unexpected_frame` | An unexpected HTTP/2 or HTTP/3 frame type was received. The frame type is either unknown, unsupported, or invalid for the current stream state. | | `unknown_stream` | An HTTP/2 frame was received on an unknown stream. | | `write_canceled` | The cancellation of a response body write aborted the HTTP/1.1 connection. | diff --git a/model/kestrel/metrics.yaml b/model/kestrel/metrics.yaml index 4bc6acf49a..0096b63970 100644 --- a/model/kestrel/metrics.yaml +++ b/model/kestrel/metrics.yaml @@ -56,14 +56,14 @@ groups: | `app_shutdown_timeout` | The connection was aborted during app shutdown. During shutdown, the server stops accepting new connections and HTTP requests, and it is given time for active requests to complete. If the app shutdown timeout is exceeded, all remaining connections are aborted. | | `closed_critical_stream` | A critical control stream for an HTTP/3 connection was closed. | | `connection_reset` | The connection was reset while there were active HTTP/2 or HTTP/3 streams on the connection. | - | `error_after_starting_response` | An error occurred after the response was started, causing an abort of the HTTP/1.1 connection or multiplexed request stream. | + | `error_after_starting_response` | An error such as an unhandled application exception or invalid request body occurred after the response was started, causing an abort of the HTTP/1.1 connection. | | `error_reading_headers` | An error occurred when decoding HPACK headers in an HTTP/2 `HEADERS` frame. | | `error_writing_headers` | An error occurred when encoding HPACK headers in an HTTP/2 `HEADERS` frame. | | `flow_control_queue_size_exceeded` | The connection exceeded the outgoing flow control maximum 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). | | `flow_control_window_exceeded` | The client sent more data than allowed by the current flow-control window. | | `frame_after_stream_close` | An HTTP/2 frame was received on a closed stream. | | `insufficient_tls_version` | The connection doesn't have TLS 1.2 or greater, as required by HTTP/2. | - | `invalid_body_reader_state` | An error occurred when draining the request body, aborting the HTTP/1.1 connection. | + | `invalid_body_reader_state` | An error occurred when draining the request body, aborting the HTTP/1.1 connection. This could be caused by app code reading the request body and missing a call to `PipeReader.AdvanceTo` in a finally block. | | `invalid_data_padding` | An HTTP/2 `HEADER` or `DATA` frame has an invalid amount of padding. | | `invalid_frame_length` | An HTTP/2 frame was received with an invalid frame payload length. The frame could contain a payload that is not valid for the type, or a `DATA` frame payload does not match the length specified in the frame header. | | `invalid_handshake` | An invalid HTTP/2 handshake was received. | @@ -73,7 +73,7 @@ groups: | `invalid_settings` | The connection received an HTTP/2 or HTTP/3 `SETTINGS` frame with invalid settings. | | `invalid_stream_id` | An HTTP/2 stream with an invalid stream ID was received. | | `invalid_window_update_size` | The server received an HTTP/2 `WINDOW_UPDATE` frame with a zero increment, or an increment that caused a flow-control window to exceed the maximum size. | - | `io_error` | An `IOException` occurred while reading or writing connection data. | + | `io_error` | An `IOException` occurred while reading or writing HTTP/2 or HTTP/3 connection data. | | `keep_alive_timeout` | There was no activity on the connection, and the keep-alive timeout configured by `KestrelServerLimits.KeepAliveTimeout` was exceeded. | | `max_concurrent_connections_exceeded` | The connection exceeded the maximum concurrent connection limit. Configured by `KestrelServerLimits.MaxConcurrentConnections`. | | `max_frame_length_exceeded` | The connection received an HTTP/2 frame that exceeded the size limit specified by `Http2Limits.MaxFrameSize`. | @@ -92,7 +92,7 @@ groups: | `stream_self_dependency` | The connection received an HTTP/2 frame that caused a frame to depend on itself. | | `tls_handshake_failed` | An error occurred during the TLS handshake for a connection. Only reported for HTTP/1.1 and HTTP/2 connections. The TLS handshake for HTTP/3 is internal to QUIC transport. | ![Experimental](https://img.shields.io/badge/-experimental-blue) | | `tls_not_supported` | A TLS handshake was received by an endpoint that isn't configured to support TLS. | - | `unexpected_end_of_request_content` | The HTTP request body ended before the data specified by `content-length` was received. | + | `unexpected_end_of_request_content` | The HTTP/1.1 request body ended before the data specified by the `content-length` header or chunked transfer encoding mechanism was received. | | `unexpected_frame` | An unexpected HTTP/2 or HTTP/3 frame type was received. The frame type is either unknown, unsupported, or invalid for the current stream state. | | `unknown_stream` | An HTTP/2 frame was received on an unknown stream. | | `write_canceled` | The cancellation of a response body write aborted the HTTP/1.1 connection. | From 712b76b368b43ceac7b95e891854cc2308630d75 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 14 Nov 2024 10:19:48 -0800 Subject: [PATCH 11/14] Apply suggestions from code review --- model/kestrel/metrics.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/kestrel/metrics.yaml b/model/kestrel/metrics.yaml index 0096b63970..2cd01c8990 100644 --- a/model/kestrel/metrics.yaml +++ b/model/kestrel/metrics.yaml @@ -44,6 +44,7 @@ groups: conditionally_required: if and only if an error has occurred. note: "Captures the exception type when a connection fails." examples: ['System.OperationCanceledException', 'Contoso.MyException'] + # yamllint disable rule:line-length - ref: error.type # TODO: move note to yaml once https://github.com/open-telemetry/build-tools/issues/192 is supported note: | @@ -98,6 +99,7 @@ groups: | `write_canceled` | The cancellation of a response body write aborted the HTTP/1.1 connection. | In other cases, `error.type` contains the fully qualified type name of the exception. + # yamllint enable rule:line-length - id: metric.kestrel.rejected_connections type: metric metric_name: kestrel.rejected_connections From 986aa66f71917d80a4a6393771989b3e0a13ab63 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Fri, 15 Nov 2024 08:37:15 +0800 Subject: [PATCH 12/14] Update model/kestrel/metrics.yaml --- model/kestrel/metrics.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/kestrel/metrics.yaml b/model/kestrel/metrics.yaml index 2cd01c8990..ba25995767 100644 --- a/model/kestrel/metrics.yaml +++ b/model/kestrel/metrics.yaml @@ -180,4 +180,4 @@ groups: unit: "{handshake}" note: | Meter name: `Microsoft.AspNetCore.Server.Kestrel`; Added in: ASP.NET Core 8.0 - extends: common.kestrel.attributes \ No newline at end of file + extends: common.kestrel.attributes From 981952d6150260eba317f28382ec1a5218e88cc0 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Fri, 15 Nov 2024 08:41:00 +0800 Subject: [PATCH 13/14] Update docs/dotnet/dotnet-kestrel-metrics.md --- docs/dotnet/dotnet-kestrel-metrics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index ad9f12cd0d..db0c6bd1ad 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -571,4 +571,4 @@ different processes could be listening on TCP port 12345 and UDP port 12345. -[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status \ No newline at end of file +[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status From 71dc407e2aec18443ad4d07f5bc0cb23aff3b420 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Fri, 15 Nov 2024 08:59:36 +0800 Subject: [PATCH 14/14] Change log file --- .chloggen/1548.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .chloggen/1548.yaml diff --git a/.chloggen/1548.yaml b/.chloggen/1548.yaml new file mode 100644 index 0000000000..9651a2a115 --- /dev/null +++ b/.chloggen/1548.yaml @@ -0,0 +1,4 @@ +change_type: enhancement +component: kestrel +note: Add .NET 9 error reasons to Kestrel connection metric. +issues: [1582]