This is my personal collection of notes, scripts and techniques developed to help debug live .NET Core applications. All of these techniques were performed from a sidecar in Kubernetes. If you are interested in profiling .NET Core applications running on Linux without Kubernetes then these guides still will contain a lot of useful information.
Feel free to ask questions, suggest changes or submit pull requests.
The below dynamic tracing demo was performed on this application built with this Dockerfile. Even though this application was built normally and contains no special instrumentation we can still dynamically trace any method in the application using bcc. In the following demo we will trace calculateFibonacciValue and calculateEchoValue.
Check out the below guides to get details on how to do this and more.
- cpu profiling
- Building FlameGraphs from perf data
- static tracepoints
- Recording and viewing LTTng events
- Static Tracepoints and CPU Profiling the Microsoft way
- dynamic tracing
- Perf events and BCC to trace any method in an application without instrumentation
- core dumps
- Multiple methods for collecting and analyzing coredumps.
- A collection of Dockerfiles to build sidecar profiling containers.
- kernel interactions
- The containers, tools, and the kernel can sometimes have weird interactions. This document contains information on how to get these tools working on a variety of kernel versions.
- Future work for this repo.
Previously this repo was focused on executing these techniques from the node the application was running on. If you are interested in that approach you can check it out here.