Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating ref docs to include the metrics bucket information for connection histograms #37811

Merged
merged 4 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/core/diagnostics/built-in-metrics-aspnetcore.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ 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 ].

<!-- Once we migrate this doc to https://github.com/dotnet/AspNetCore.Docs we can remove the following version info -->
Available staring in: ASP.NET Core 8.0

Expand Down Expand Up @@ -240,6 +242,8 @@ Available staring in: ASP.NET Core 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 staring in: ASP.NET Core 8.0

### Instrument: `kestrel.rejected_connections`
Expand Down Expand Up @@ -323,6 +327,8 @@ Available staring in: ASP.NET Core 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 staring in: ASP.NET Core 8.0

### Instrument: `kestrel.active_tls_handshakes`
Expand Down Expand Up @@ -369,6 +375,8 @@ Available staring in: ASP.NET Core 8.0
| `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 staring in: ASP.NET Core 8.0

### Instrument: `signalr.server.active_connections`
Expand Down
6 changes: 6 additions & 0 deletions docs/core/diagnostics/built-in-metrics-system-net.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ Most errors when doing a DNS lookup throw a <xref:System.Net.Sockets.SocketExcep

Socket exceptions with any other `SocketError` value are reported as `System.Net.Sockets.SocketException`.

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

## Meter: `System.Net.Http`
Expand Down Expand Up @@ -85,6 +87,8 @@ Available starting in: .NET 8

This metric is only captured when <xref:System.Net.Http.HttpClient> is configured to use the default <xref:System.Net.Http.SocketsHttpHandler>.

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

### Instrument: `http.client.request.duration`
Expand All @@ -105,6 +109,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

### Instrument: `http.client.request.time_in_queue`
Expand Down
Loading