In this post, I will introduce and demonstrate enhancements to collections in .NET 9 and C# 13 for low-allocation code paths. Specifically, I will demonstrate using a custom IAlternateEqualityComparer and the AlternateLookup on a Dictionary used for efficiently tracking IP address information, keyed on the bytes of IP addresses. My use case, the basis for […]
Receiving GitHub Webhooks When Using the ASP.NET Core Developer Certificate
SERIES: A Guide to Developing GitHub Apps on .NET For the last couple of weeks, I have been experimenting with creating a GitHub App using .NET. I’ve been pursuing this because I have an idea for an integration that could be interesting, and it also provides a real-world scenario to keep my skills fresh. I […]
Disabling Recording of an Activity (span) in .NET OpenTelemetry Instrumentation
I’ve recently been building some hobby code to dogfood the various observability tooling we develop at Elastic. Additionally, I’ve been interested in identifying the pain points of using our products as well as the .NET instrumentation libraries (from System.Diagnostics) used to instrument code in an OpenTelemetry-compatible way. Recording Activities in .NET In today’s short post, […]
Understanding System.Diagnostics DiagnosticSource and DiagnosticListener (Part 1)
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)
SERIES: A Guide to Developing GitHub Apps on .NET 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 […]