Skip to content

Additional metrics for .NET Core and ASP.NET Core #79459

Closed
@rob2244

Description

@rob2244

I have talked internally with the IC3 platform team, and we've come up with a list of additional metrics we'd love to see in .NET 8 which would help us (and others) better understand, monitor and fine tune our services.

Http Connection Pool Metrics

Ideally these metrics would be available per FQDN:Port combination, broken down by type (i.e. HTTP1.1/HTTP2) and there would be some way to track which http client each pool belongs to.

  • total number of connections
  • number of idle connections
  • average idle connection time
  • number of connections evicted from pool due to idle timeout
  • number of connection timeouts
  • average time to connect
  • queue length
  • average time spent in queue
  • number of http 2 keep alive pings which didn't receive a response
  • average response time of http 2 keep alive pings

Rate Limiting Middleware Metrics

It would be great if we could have some way of telling these apart by specific rate limiter, as I know that in .NET 7 you can have multiple rate limiters configured. Maybe if we could name each rate limiter then get the metrics output by the name? Or maybe it could be by the endpoint which the rate limiter protects?

  • Number of requests kicked out by limiter
  • For limiters with queues, length of queue and average time spent in queue
  • For Token based limiters the number of unclaimed tokens in the pool and the average rate at which tokens are removed from the pool
  • For Fixed window limiters the number of requests seen per window
  • For sliding window limiters, the number of requests seen in a window, the number of requests seen in a segment and the number of requests that appeared in multiple segments

Kestrel Metrics

  • Number of client requests cancelled/client disconnects (not sure if this one is possible or not)

Memory Metrics

  • Private Bytes (MB) as tracked by this issue

Thanks!

Metadata

Metadata

Assignees

Labels

area-System.Net.HttpenhancementProduct code improvement that does NOT require public API changes/additions

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions