Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
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:
- Add tags to the exist Kestrel connection metric with the internal reason why the connection was closed. Consider adding the public protocol response code, e.g. GOAWAY.
- Consider adding a stream duration metric for multiplex connections (HTTP/2, HTTP/3) with information about the stream, including why it was closed (internal reason and public protocol code)
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