Metriche repository
- Star
- (17.886 star)
- Metriche merge PR
- (Merge medio 12g 11h) (661 PR mergiate in 30 g)
Descrizione
Background and motivation
I am looking for a reasonable way to monitor traffic (number of bytes received) on HTTP requests including HTTP/3.
I found a previous issue https://github.com/dotnet/runtime/issues/41949 that allows to use a custom stream implementation for H2
However, I don't see that being viable for QuicConnetions and H3.
What I would prefer is something similar as described in https://github.com/dotnet/runtime/issues/31003 by @karelz using monitoring.
However, the ReadAsync only seems to monitor the size of the buffer where the data is read into, but not the actual size of the received data:
if (NetEventSource.Log.IsEnabled())
{
NetEventSource.Info(this, $"{this} Stream reading into memory of '{buffer.Length}' bytes.");
}
Is there an alternative approach to access this data?
API Proposal
I would be happy to use EventListener to collect the described data.
Ideally the event payload could store the size of the data without formatting it to string message.
API Usage
No new public API would be required.
Alternative Designs
No response
Risks
No response