dotnet-counters not showing threadpool counters in .NET 10 After upgrading from .NET 9 to .NET 10
I just upgraded an ASP.NET MVC application from .NET 9 to .NET 10. The process was straightforward: I simply changed the target framework version in the project file and updated a few NuGet packages. The app is hosted in Kubernetes, so I also updated the ASP.NET image version in the Dockerfile.
I built and deployed everything, and it went smoothly—taking just about 10 minutes in total.
Next, I wanted to inspect the ThreadPool performance counters inside the running container.
downloaded dotnet-counters direct binaries from https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters
copied to container with kubectl cp .
Initially ran dotnet-counters from Windows Terminal (connected via kubectl exec).
→ The default System.Runtime counters loaded, but ThreadPool metrics (like threadpool-thread-count) were missing.
Switched to PuTTY (same kubectl exec session). → ThreadPool counters appeared.
The issue was specific to Windows Terminal—likely a display or ANSI escape sequence handling problem , resolution something.
So ran with counter filter then it showed
dotnet-counters monitor --process-id 1 --counters System.Runtime[threadpool-thread-count,threadpool-queue-length,threadpool-completed-items-count]
You can see available counters via ./dotnet-counters.2 list , recently it gives a url to the documentation https://learn.microsoft.com/dotnet/core/diagnostics/built-in-metrics.
Comments
Post a Comment