AspNet.Tx.Board 1.0.5

dotnet add package AspNet.Tx.Board --version 1.0.5
                    
NuGet\Install-Package AspNet.Tx.Board -Version 1.0.5
                    
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="AspNet.Tx.Board" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AspNet.Tx.Board" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="AspNet.Tx.Board" />
                    
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 AspNet.Tx.Board --version 1.0.5
                    
#r "nuget: AspNet.Tx.Board, 1.0.5"
                    
#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 AspNet.Tx.Board@1.0.5
                    
#: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=AspNet.Tx.Board&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=AspNet.Tx.Board&version=1.0.5
                    
Install as a Cake Tool

ASP.NET Tx Board

ASP.NET Tx Board is a transaction monitoring and diagnostics package for ASP.NET Core applications. It captures HTTP request timing, database transaction behavior, SQL execution metadata, and provides a built-in dashboard/API for analysis.

Inspired by spring-tx-board: https://github.com/Mamun-Al-Babu-Shikder/spring-tx-board

Requirements

  • .NET 10 SDK/runtime
  • ASP.NET Core application
  • Entity Framework Core (recommended, for transaction and SQL tracking)

<br> <img width="1024" height="1024" alt="image" src="https://github.com/user-attachments/assets/f99ea307-8927-4f01-9049-26bf7043cd51" />

Install

dotnet add package AspNet.Tx.Board

Quick Start

In Program.cs:

using AspNet.Tx.Board.Extensions;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddTxBoard(builder.Configuration);

var app = builder.Build();

app.UseTxBoard();
app.Run();

EF Core Interceptors (Important)

For database transaction and SQL visibility, add Tx Board interceptors to your DbContext options:

using AspNet.Tx.Board.Interceptors;

builder.Services.AddDbContext<AppDbContext>((sp, options) =>
{
    options.UseSqlite("Data Source=app.db");

    options.AddInterceptors(
        sp.GetRequiredService<TxBoardTransactionInterceptor>(),
        sp.GetRequiredService<TxBoardCommandInterceptor>(),
        sp.GetRequiredService<TxBoardConnectionInterceptor>()
    );
});

Configuration

appsettings.json:

{
  "TxBoard": {
    "Enabled": true,
    "EnableTelemetry": false,
    "LogType": "Simple",
    "Storage": "InMemory",
    "AlarmingThreshold": {
      "Transaction": 1000,
      "Connection": 1000
    },
    "DurationBuckets": [100, 500, 1000, 2000, 5000],
    "Redis": {
      "EntityTtl": "7.00:00:00"
    }
  }
}

Options

Key Description Default
Enabled Enables/disables Tx Board capture true
EnableTelemetry Enables/disables trace and metric emission false
LogType Simple or Details logging format Simple
Storage InMemory or Redis InMemory
AlarmingThreshold.Transaction Warn threshold for transaction duration (ms) 1000
AlarmingThreshold.Connection Warn threshold for connection occupied time (ms) 1000
DurationBuckets Duration histogram buckets (ms) [100,500,1000,2000,5000]
Redis.EntityTtl Retention TTL for Redis mode 7 days

Note: Storage: Redis currently falls back to in-memory storage with a warning log.

Endpoints

Dashboard and HTTP Metrics

  • GET /tx-board/ui
  • GET /tx-board/api/transactions
  • GET /tx-board/api/distribution
  • GET /tx-board/api/export

ASP.NET TX Board-Compatible APIs

  • GET /api/tx-board/config/alarming-threshold
  • GET /api/tx-board/tx-summary
  • GET /api/tx-board/tx-charts
  • GET /api/tx-board/tx-logs
  • GET /api/tx-board/sql-logs

OpenTelemetry

Tx Board can emit traces and metrics via the standard .NET System.Diagnostics APIs - no extra NuGet packages are required in the library itself. Telemetry is optional and disabled by default.

Traces

A span named db.transaction is started for every database transaction and carries the following tags:

Tag Example
db.transaction.method OrderService.PlaceOrder
db.transaction.isolation_level ReadCommitted
db.transaction.propagation Required / Nested
db.transaction.status Committed / RolledBack / Errored
db.transaction.query_count 4
db.transaction.alarming false

Metrics

Metric Unit Tags
tx_board.transaction.duration ms db.transaction.method, db.transaction.status, db.transaction.propagation
tx_board.connection.duration ms db.connection.alarming
tx_board.request.duration ms http.method, http.route, http.status_code

Setup

Set TxBoard:EnableTelemetry to true, then install your preferred OTel exporter (e.g. OpenTelemetry.Exporter.Console, OpenTelemetry.Exporter.OpenTelemetryProtocol) and register the Tx Board source/meter:

builder.Services.AddOpenTelemetry()
    .WithTracing(t => t
        .AddSource("AspNet.Tx.Board")
        .AddConsoleExporter())
    .WithMetrics(m => m
        .AddMeter("AspNet.Tx.Board")
        .AddConsoleExporter());

When EnableTelemetry is false, Tx Board does not emit spans/metrics. When it is true and no OTel listener is registered, instrumentation is a no-op.

Logging

  • Simple mode:
    • Info for healthy transactions
    • Warning for alarming transactions or connection usage
  • Details mode:
    • Structured multi-line transaction/sql diagnostics

Maintainer

Built and maintained by Tamzid.

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
1.0.5 31 2/25/2026
1.0.4 28 2/25/2026
1.0.3 38 2/24/2026
1.0.2 34 2/24/2026
1.0.1 28 2/24/2026