Throughout its history, .NET has evolved various mechanisms to “log” diagnostic information inside applications and libraries, including TraceSource, EventSource, ILogger, and DiagnosticSource, the subject of this post. TraceSource is a legacy option and is rarely used in new code. ILogger is a simple structured logging abstraction that is well suited to many applications, although it […]
Authenticating a .NET GitHub App using a JSON Web Token (JWT)
In this post, I cover the steps required to create and sign a JSON Web Token, herein abbreviated as JWT, to authenticate a GitHub App built using .NET. I want to state clearly up front that I’m learning as I go while experimenting with a hobby project to develop a GitHub App. Some of the […]
Profiling Memory Allocations on Linux using the JetBrains dotMemory Command-Line Profiler
In a previous post (Automating memory profiling with the JetBrains dotMemory Profiler API), I described the steps that could be used to automate the collection of memory snapshots and profiling data by using the JetBrains Profiler API NuGet package. In that post, we triggered the profiling session using the dotMemory application on Windows. As part […]
Automating Memory Profiling with the JetBrains dotMemory Profiler API
Those who have read some of my previous performance-focused blog posts will know that I use the dotMemory product from JetBrains when working on code optimisations. In this post, I want to demonstrate a really handy, but somewhat underutilised feature, to automate the collection of snapshots in a repeatable way. I use these steps quite […]
Introducing the new IHostedLifecycleService Interface in .NET 8
As regular readers will be aware, an area of .NET which I follow closely is Microsoft.Extensions.Hosting. I’ve already blogged about a change in .NET 8, where new concurrency options have been introduced to support parallel running of the StartAsync and StopAsync across multiple IHostedServices. In this post, we’ll look at some new lifecycle events introduced […]