dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
34.9k stars 9.86k forks source link

Improve Kestrel metrics #53358

Closed JamesNK closed 1 day ago

JamesNK commented 6 months ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe the problem.

It's useful to see low-level connection and request information in Kestrel. This information can be used to track regular web app usage, diagnose performance issues and observe malicious activity.

Describe the solution you'd like

Improve Kestrel metrics:

Tracking the number of streams a multiplexed connection created could also be valuable. I'm not sure the best way to do that. Tag on a connection (will need to be rounded to certain values to limit cardinality) or a separate kestrel.connection.streams_count histogram metric.

Additional context

No response

amcasey commented 5 months ago

It would be nice if we could:

  1. Detect an ongoing attack
  2. Fingerprint a past attack