Distributed Systems OpenTelemetry 1.0 Extensions Released With the release of OpenTelemetry tracing specification reaching 1.0, and the subsequent release of the 1.0 release of the core components of .NET, I've pushed updates to my OpenTelemetry packages for: * NServiceBus.Extensions.Diagnostics.OpenTelemetry * MongoDB.Driver.Core.Extensions.OpenTelemetry While those packages didn't
Dependency Injection Choosing a ServiceLifetime A subtle source of errors and less-than-subtle source of frustration is understanding and using service lifetimes appropriately with .NET Core dependency injection. Service lifetimes, while complicated on the surface, can help developers that need to share state across different lifetimes of an application. Typically, a long-running application has three service
Microservices A Lap Around ActivitySource and ActivityListener in .NET 5 Part of the new DiagnosticSource API are new ways of "listening" in to activities with the addition of the ActivitySource and ActivityListener APIs. These are intended to replace the DiagnosticSource and DiagnosticListener APIs. However, the latter two types aren't deprecated, and aren't being removed
Microservices Increasing Trace Cardinality with Activity Tags and Baggage One of the first "oh no" moments for folks new to distributed tracing is the needle in the haystack problem. Someone reports an error, you go look for traces in your tool (Azure Monitor or whatever), and because there are thousands of traces, you can't easily
Microservices Building End-to-End Diagnostics: ActivitySource and OpenTelemetry 1.0 Posts in this series: * An Intro * Trace Context * Diagnostic Events * OpenTelemetry Integration * Activity and Span Correlation * Visualization with Exporters * User-Defined Context with Correlation Context * ActivitySource and OpenTelemetry 1.0 It's a few months, and quite a lot has changed in the tracing landscape in .NET. As OpenTelemetry marches
Architecture Vertical Slice Example Updated to .NET 5 With the release of .NET 5, I wanted to update my Vertical Slice code example (Contoso University) to .NET 5, as well as leverage all the C# 9 goodness. The migration itself was very simple, but updating the dependencies along the way proved to be a bit more of a
.NET 5.0 Mind Your Strings with .NET 5.0 In the process of upgrading a library to support .NET 5.0, I ran into a rather bizarre test failure. Simply by adding a new target of net5.0 in the library and unit tests, single test started to fail. It was absolutely baffling to me, leading my to think
MediatR MediatR 9.0 Released A small release, from the release notes: This release contains a small, but breaking change. In order to provide a simpler interface, the IMediator interface is now split into two interfaces, a sender and publisher: public interface ISender { Task<TResponse> Send<TResponse>(IRequest<TResponse>
Constrained Open Generics Support Merged in .NET Core DI Container Continuing the trend of extremely long blog titles...years ago I opened a pull request for supporting constrained open generics in the built-in Microsoft.Extensions.DependencyInjection container. And another. And another....and another. But I did not give up hope - after porting through a couple repo moves and consolidations,
Distributed Systems Diagnostics and Instrumentation Packages Targeting Open Telemetry Beta for MongoDB and NServiceBus Published That's...a long title. I've published release packages for System.Diagnostics support for NServiceBus and MongoDB: * NServiceBus.Extensions.Diagnostics * MongoDB.Driver.Core.Extensions.DiagnosticSources And published new beta packages targeting the beta release of OpenTelemetry: * NServiceBus.Extensions.Diagnostics.OpenTelemetry * MongoDB.Driver.Core.Extensions.OpenTelemetry The Diagnostics
NServiceBus End-to-End Integration Testing with NServiceBus: How It Works In my last post, I walked through setting up end-to-end integration testing with NServiceBus, and how we can use it to black box test message endpoints similar to how the ASP.NET Core integration testing works. In this post, I want to walk through how it all works underneath the
NServiceBus End-to-End Integration Testing with NServiceBus One of the interesting side effects of adding diagnostic events to infrastructure is that you can now "listen in" to what's going on in your applications for black box testing. This can be especially useful in scenarios where you're building on top of a
Personal Becoming a Technical Fellow at Headspring, and New Beginnings My journey at Headspring started for me at a local developer meetup, the "Austin Agile Lunch" group, way back in 2007. I had started blogging and getting involved in the community, attending the local .NET user group, code camp, and most influentially, the first ALT.NET open space
Microservices Building End-to-End Diagnostics: User-Defined Context with Correlation Context Posts in this series: * An Intro * Trace Context * Diagnostic Events * OpenTelemetry Integration * Activity and Span Correlation * Visualization with Exporters * User-Defined Context with Correlation Context * ActivitySource and OpenTelemetry 1.0 Source Code With a brief detour to push out some NuGet packages, I wanted to pick up with a common issue
Distributed Systems Diagnostics and Instrumentation Packages for MongoDB and NServiceBus Published As part of the end-to-end diagnostics and tracing blog series, I had an end goal of eventually publishing out NuGet packages for diagnostics (Activity and DiagnosticSource). I'm happy to announce that I've released 4 packages to NuGet: * NServiceBus.Extensions.Diagnostics * NServiceBus.Extensions.Diagnostics.OpenTelemetry * MongoDB.Driver.
Microservices Building End-to-End Diagnostics: Visualization with Exporters Posts in this series: * An Intro * Trace Context * Diagnostic Events * OpenTelemetry Integration * Activity and Span Correlation * Visualization with Exporters * User-Defined Context with Correlation Context * ActivitySource and OpenTelemetry 1.0 Source Code In the last post, we looked at surfacing our diagnostics events from the Activity and DiagnosticSource APIs on through
Microservices Building End-to-End Diagnostics: Activity and Span Correlation Posts in this series: * An Intro * Trace Context * Diagnostic Events * OpenTelemetry Integration * Activity and Span Correlation * Visualization with Exporters * User-Defined Context with Correlation Context * ActivitySource and OpenTelemetry 1.0 Source Code In the last post, we looked at hooking up our diagnostics events (and Activities) to OpenTelemetry, where our main
Microservices Building End-to-End Diagnostics: OpenTelemetry Integration Posts in this series: * An Intro * Trace Context * Diagnostic Events * OpenTelemetry Integration * Activity and Span Correlation * Visualization with Exporters * User-Defined Context with Correlation Context * ActivitySource and OpenTelemetry 1.0 Source Code In the last post, we looked at providing diagnostic event hooks into our code at specific points so that
Microservices Building End-to-End Diagnostics and Tracing: Diagnostic Events Posts in this series: * An Intro * Trace Context * Diagnostic Events * OpenTelemetry Integration * Activity and Span Correlation * Visualization with Exporters * User-Defined Context with Correlation Context * ActivitySource and OpenTelemetry 1.0 Source Code In the last post, we looked at the W3C Trace Context standard, and how we can extend NServiceBus to
Microservices Building End-to-End Diagnostics and Tracing: Trace Context Posts in this series: * An Intro * Trace Context * Diagnostic Events * OpenTelemetry Integration * Activity and Span Correlation * Visualization with Exporters * User-Defined Context with Correlation Context * ActivitySource and OpenTelemetry 1.0 Source Code In the last post, I walked through the overall problem we run into with diagnosing issues in distributed systems
Microservices Building End-to-End Diagnostics and Tracing: An Intro Posts in this series: * An Intro * Trace Context * Diagnostic Events * OpenTelemetry Integration * Activity and Span Correlation * Visualization with Exporters * User-Defined Context with Correlation Context * ActivitySource and OpenTelemetry 1.0 Source Code As microservices introduced (forced) highly complex distributed systems into organizations, the tools required to operate these architectures needed to
NServiceBus NServiceBus and .NET Core Generic Host My current client is using .NET Core 2.x, with plans to upgrade to 3.x next month. As part of that system, we do quite a bit of messaging, with NServiceBus as the tool of choice to help make this easier. To get it working with our .NET Core
Testing Avoid In-Memory Databases for Tests A controversial GitHub issue came to my attention a couple of weeks ago around ditching the in-memory provider for Entity Framework Core. This seemed like a no-brainer to me - these database providers are far from trivial to maintain, even for in-memory strategies. It's something our teams learned
MongoDB Document-Level Pessimistic Concurrency in MongoDB In the last post, I got quite a few comments on some other ways to approach OCC. One pointed out that I wanted to explore was using a "SELECT...FOR UPDATE", which basically will grant an intent lock on the document in question. With an intent lock, we
Architecture Immutability in DTOs? Something that comes up every so often is the question of whether or not Data Transfer Objects should be immutable - that is, should our design of the classes and types of a DTO enforce immutability. To answer this question, we first need to look at what purpose a DTO