AuditLoggingPipeline.Tracker 0.1.0

dotnet add package AuditLoggingPipeline.Tracker --version 0.1.0
                    
NuGet\Install-Package AuditLoggingPipeline.Tracker -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AuditLoggingPipeline.Tracker" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AuditLoggingPipeline.Tracker" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="AuditLoggingPipeline.Tracker" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AuditLoggingPipeline.Tracker --version 0.1.0
                    
#r "nuget: AuditLoggingPipeline.Tracker, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AuditLoggingPipeline.Tracker@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AuditLoggingPipeline.Tracker&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=AuditLoggingPipeline.Tracker&version=0.1.0
                    
Install as a Cake Tool

AuditLoggingPipeline.Tracker

Non-blocking state-trail (before/after entity value) tracking for .NET APIs, built around a DispatchProxy-based interception pattern. Independent sibling of AuditLoggingPipeline (the Audit plugin); depends only on AuditLoggingPipeline.Models.

What it does

TrackingDispatchProxy<TInterface> transparently wraps a service interface implementation. Any invoked method whose name starts with Save, Add, Update, Archive, or Delete has its first reference-type argument (the entity being mutated) snapshotted before the call, and the call's outcome observed asynchronously afterward — without ever delaying, blocking, or faulting the caller's original request. A StateTrailEntry (before/after snapshot, success/failure) is queued onto a bounded TrackerChannel and drained by a background hosted service, TrackerLogBackgroundService, which fans each entry out to every ITrackerSink registered by the consuming application.

This library ships the interception mechanism and plumbing only. It does not ship any concrete sink implementation — each consuming application defines its own ITrackerSink implementations (e.g. a state-trail table keyed by entity id) and registers zero, one, or several of them. Each registered sink is invoked and isolated independently: a slow or failing sink can never affect another sink, the channel drain loop, or the caller's original request.

Usage

// Startup
services.AddStateTrailTracking();
services.AddScoped<ITrackerSink, MyStateTrailSink>();
services.AddTrackedScoped<IClientService, ClientService>();

Relationship to AuditLoggingPipeline (Audit)

Tracker and Audit are fully independent sibling plugins:

  • Each owns its own bounded channel, background service, DispatchProxy, and DI registration helpers (AddStateTrailTracking/AddTrackedScoped vs. AddAuditLogging/AddAuditedScoped).
  • Neither references the other; both depend only on AuditLoggingPipeline.Models.
  • A consumer can install Models + Tracker only, Models + Audit only, or both — a failure or slowdown in one plugin's pipeline never affects the other.

Design notes

  • Tracking is fully non-blocking: results are returned to the caller untouched, and tracking work is spun off independently via Task.Run.
  • Any exception thrown by the wrapped call propagates to the caller unchanged (unwrapped from the DispatchProxy reflection wrapper); the tracking task never rethrows.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 43 9/26/2026