diff --git a/docs/core/diagnostics/built-in-metrics-aspnetcore.md b/docs/core/diagnostics/built-in-metrics-aspnetcore.md index 2235c4e8f4039..8b293fd6de8d4 100644 --- a/docs/core/diagnostics/built-in-metrics-aspnetcore.md +++ b/docs/core/diagnostics/built-in-metrics-aspnetcore.md @@ -2,7 +2,7 @@ title: ASP.NET Core metrics description: Review the metrics available for ASP.NET Core ms.topic: reference -ms.date: 11/02/2023 +ms.date: 2/01/2024 --- # ASP.NET Core metrics @@ -48,6 +48,9 @@ The time ends when: - All response data has been sent. - The context data structures for the request are being disposed. +When using OpenTelemetry, the default buckets for this metric are set to [ 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 ]. + + Available starting in: .NET 8.0. ##### Metric: `http.server.active_requests` @@ -255,6 +258,8 @@ Available starting in: .NET 8.0. | `server.port` | int | Server port number | `80`; `8080`; `443` | If the transport is `tcp` or `udp`. | | `tls.protocol.version` | string | TLS protocol version. | `1.2`; `1.3` | If the connection is secured with TLS. | +As this metric is tracking the connection duration, and ideally http connections are used for multiple requests, the buckets should be longer than those used for request durations. For example, using [ 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300] provides an upper bucket of 5 mins. + Available starting in: .NET 8.0. ##### Metric: `kestrel.rejected_connections` @@ -338,6 +343,8 @@ Available starting in: .NET 8.0. | `server.port` | int | Server port number | `80`; `8080`; `443` | If the transport is `tcp` or `udp`. | | `tls.protocol.version` | string | TLS protocol version. | `1.2`; `1.3` | If the connection is secured with TLS. | +When using OpenTelemetry, the default buckets for this metic are set to [ 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 ]. + Available starting in: .NET 8.0. ##### Metric: `kestrel.active_tls_handshakes` @@ -375,6 +382,24 @@ The `Microsoft.AspNetCore.Http.Connections` metrics report connection informatio Available starting in: .NET 8.0. +| Value | Description | +|---|---| +| `normal_closure` | The connection was closed normally. | +| `timeout` | The connection was closed due to a timeout. | +| `app_shutdown` | The connection was closed because the app is shutting down. | + +`signalr.transport` is one of the following: + +| Value | Protocol | +|---|---| +| `server_sent_events` | [server-sent events](https://developer.mozilla.org/docs/Web/API/Server-sent_events/Using_server-sent_events) | +| `long_polling` | [Long Polling](/archive/msdn-magazine/2012/april/cutting-edge-long-polling-and-signalr) | +| `web_sockets` | [WebSocket](https://datatracker.ietf.org/doc/html/rfc6455) | + +As this metric is tracking the connection duration, and ideally SignalR connections are durable, the buckets should be longer than those used for request durations. For example, using [0, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300] provides an upper bucket of 5 mins. + +Available starting in: .NET 8.0. + ##### Metric: `signalr.server.active_connections` | Name | Instrument Type | Unit (UCUM) | Description | diff --git a/docs/core/diagnostics/built-in-metrics-system-net.md b/docs/core/diagnostics/built-in-metrics-system-net.md index 98d4745c36680..131dbf4b5d11f 100644 --- a/docs/core/diagnostics/built-in-metrics-system-net.md +++ b/docs/core/diagnostics/built-in-metrics-system-net.md @@ -44,6 +44,8 @@ Most errors when doing a DNS lookup throw a is configured to use the default . +As this metric is tracking the connection duration, and ideally http connections are used for multiple requests, the buckets should be longer than those used for request durations. For example, using [ 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300 ] provides an upper bucket of 5 mins. + Available starting in: .NET 8 ##### Metric: `http.client.request.duration` @@ -111,6 +115,8 @@ Available starting in: .NET 8 HTTP client request duration measures the time the underlying client handler takes to complete the request. Completing the request includes the time up to reading response headers from the network stream. It doesn't include the time spent reading the response body. +When using OpenTelemetry, the default buckets for this metric are set to [ 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 ]. + Available starting in: .NET 8 > [!TIP]