From bd52cb4a0f9cc26683408c500239e27a699e98bc Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Fri, 4 Aug 2023 15:06:47 +0200 Subject: [PATCH] add units --- .../src/System/Net/Http/Metrics/MetricsHandler.cs | 1 + .../Http/SocketsHttpHandler/Metrics/SocketsHttpHandlerMetrics.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs index 02826aa593d29..5a50d8bb12fd8 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs @@ -24,6 +24,7 @@ public MetricsHandler(HttpMessageHandler innerHandler, IMeterFactory? meterFacto // Meter has a cache for the instruments it owns _activeRequests = meter.CreateUpDownCounter( "http.client.active_requests", + unit: "{request}", description: "Number of outbound HTTP requests that are currently active on the client."); _requestsDuration = meter.CreateHistogram( "http.client.request.duration", diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Metrics/SocketsHttpHandlerMetrics.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Metrics/SocketsHttpHandlerMetrics.cs index d245de835080c..9440d4cd61c47 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Metrics/SocketsHttpHandlerMetrics.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Metrics/SocketsHttpHandlerMetrics.cs @@ -10,6 +10,7 @@ internal sealed class SocketsHttpHandlerMetrics(Meter meter) { public readonly UpDownCounter OpenConnections = meter.CreateUpDownCounter( name: "http.client.open_connections", + unit: "{connection}", description: "Number of outbound HTTP connections that are currently active or idle on the client."); public readonly Histogram ConnectionDuration = meter.CreateHistogram(