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
35.32k stars 9.97k forks source link

Byte rate metrics #54745

Open verdie-g opened 6 months ago

verdie-g commented 6 months ago

Is there an existing issue for this?

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

I would be interested to know how many bytes are read/written from/to the ASP.NET Core sockets to understand more how much data is my server processing. That could for example explain why the load on my server is increasing even though the number of requests did not change.

Describe the solution you'd like

Two new metrics for ASP.NET Core:

OTEL doesn't seem to define a convention for byte rates: https://opentelemetry.io/docs/specs/semconv/http/http-metrics.

Additional context

No response

amcasey commented 6 months ago

Seems sensible (sensible enough that we may already have done it?), but it's worth noting that we would only be tracking bytes written to the OS buffer and not actually bytes sent.

amcasey commented 6 months ago

@JamesNK may have thoughts. Maybe we considered it too chatty or maybe we just didn't get to it.