-
Notifications
You must be signed in to change notification settings - Fork 5k
new System.Net.Http.EnableMetrics switch #113528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new System.Net.Http.EnableMetrics switch #113528
Conversation
Tagging subscribers to this area: @dotnet/ncl |
Is there a reason not to reuse the existing |
Good question, I didn't think it thru yet. I just followed |
That design might be problematic. I don't know if it noticably hurts IL size or perf on wasm, mobile etc., but note that with #103922 we are now uncondtionally instantiating runtime/src/libraries/System.Net.Security/src/System/Net/Security/NetSecurityTelemetry.cs Line 18 in 273dbb9
Note that both Metrics and Distributed Tracing have high-granularity opt-in mechanisms implemented by their listner infra. For IL size reduction IMO a global switch is a better solution. |
I think we should quantify what is the extra size of IL or AOT image before we dive too deep.
Most of them are not supported in browser anyway. Except HTTP.
Makes sense. @steveisok is trimming this interesting for mobile OSes ? |
To date, android disables via |
another approach in #114326 |
Motivation: in browser/wasm the diagnostics and metrics are usually not usable in production deployment. They are making IL donwload bigger.
System.Net.Http.EnableMetrics
and use it in HTTP client to makeMetricsHandler
optionalTODO
settings._metrics
usageSystem.Net.Http.EnableMetrics
andSystem.Net.Http.EnableActivityPropagation
opt-in for browser