dotnet-trace-collect

Guides selection and execution of .NET diagnostic trace collection tools across environments.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill dotnet-trace-collect-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-trace-collect
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/dotnet-trace-collect
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill dotnet-trace-collect-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Diagnosing production .NET performance issues requires choosing the right diagnostic tool for a specific runtime, OS, and deployment topology, and developers often struggle to know whether to use PerfView, dotnet-trace, perfcollect, or dotnet-monitor for their situation. ## Core Features & Use Cases - Environment-Based Tool Selection: Recommends the correct diagnostic tool based on runtime (.NET Framework vs modern .NET), OS (Windows/Linux), privileges, and container/Kubernetes deployment. - Symptom-Specific Collection Guidance: Provides exact commands for high CPU, memory leaks, excessive GC, slow requests, hangs, networking failures, and assembly loading issues. - Container and Kubernetes Support: Covers sidecar setups with dotnet-monitor, in-container collection, and kubectl-based artifact retrieval. - Use Case: A developer sees intermittent slow requests on a Linux Kubernetes pod running .NET 8. The skill recommends dotnet-trace with Kestrel providers, gives the exact collection command, and explains how to copy the trace out for analysis in PerfView or Speedscope. ## Quick Start Ask the assistant to help collect a diagnostic trace for a high CPU issue on a Linux container running .NET 8 without root access.

Frequently Asked Questions about dotnet-trace-collect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I collect a diagnostic trace for a .NET application in production?

Use dotnet-trace collect -p <PID> for modern .NET on any OS without admin rights, or PerfView on Windows with admin privileges for richer ETW data. On Linux with .NET 10+ and root, dotnet-trace collect-linux adds native call stacks and kernel events.

PerfView vs dotnet-trace: which should I use?

PerfView produces richer ETW-based data and supports .NET Framework but requires Windows and admin privileges. dotnet-trace works cross-platform without admin but captures only managed frames with less system-level detail.

How do I collect traces from a .NET app running in Kubernetes?

With console access, run dotnet-trace inside the container and copy the trace out with kubectl cp. Without console access, deploy dotnet-monitor as a sidecar sharing a /tmp volume and collect traces through its REST API via kubectl port-forward.

Does dotnet-trace work with .NET Framework applications?

No, dotnet-trace only supports modern .NET (.NET Core 3.0 and later). For .NET Framework on Windows, use PerfView, which requires admin privileges; without admin, only process dumps are available for hangs and memory leaks.

How do I diagnose memory leaks in a .NET application?

Capture two process dumps as memory grows and diff them in PerfView to identify leaking objects. Combine the dumps with a trace collected during the growth period to see allocation patterns; no stop trigger is needed.

Why does perfcollect fail inside my Linux container?

Containers drop the SYS_ADMIN capability by default, which perfcollect requires for perf and LTTng. Run the container with --privileged or add the SYS_ADMIN capability, or fall back to dotnet-trace which needs no special privileges.