Skip to content

Commit

Permalink
add units to http metrics (#90020)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonfirsov authored Aug 7, 2023
1 parent 302c44a commit e857642
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public MetricsHandler(HttpMessageHandler innerHandler, IMeterFactory? meterFacto
// Meter has a cache for the instruments it owns
_activeRequests = meter.CreateUpDownCounter<long>(
"http.client.active_requests",
unit: "{request}",
description: "Number of outbound HTTP requests that are currently active on the client.");
_requestsDuration = meter.CreateHistogram<double>(
"http.client.request.duration",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ internal sealed class SocketsHttpHandlerMetrics(Meter meter)
{
public readonly UpDownCounter<long> OpenConnections = meter.CreateUpDownCounter<long>(
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<double> ConnectionDuration = meter.CreateHistogram<double>(
Expand Down

0 comments on commit e857642

Please sign in to comment.