NetTracker.Core
2.0.4
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package NetTracker.Core --version 2.0.4
NuGet\Install-Package NetTracker.Core -Version 2.0.4
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="NetTracker.Core" Version="2.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NetTracker.Core" Version="2.0.4" />
<PackageReference Include="NetTracker.Core" />
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 NetTracker.Core --version 2.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NetTracker.Core, 2.0.4"
#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 NetTracker.Core@2.0.4
#: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=NetTracker.Core&version=2.0.4
#tool nuget:?package=NetTracker.Core&version=2.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NET-Tracker โ HTTP Request/Response Monitoring Dashboard for ASP.NET Core
NET-Tracker is a lightweight, plug-and-play HTTP tracking library for ASP.NET Core. Drop it into any existing project to get a beautiful real-time dashboard that lets you monitor, search, and analyze every HTTP request and response your application handles โ with zero boilerplate.
โจ Features
- ๐ Live Dashboard โ Interactive UI to browse, filter, and inspect all HTTP transactions
- ๐ Full-text Search โ Search by URL, method, status code, IP address, user agent, and more
- โก Async Queue Logging โ Non-blocking fire-and-forget writes keep your app fast
- ๐ก๏ธ Resilient โ Built-in retry + circuit-breaker pattern protects against DB failures
- ๐งน Auto Cleanup โ Configurable log retention to prevent unbounded database growth
- ๐ Sensitive Data Masking โ Automatically masks passwords, tokens, API keys in logs
- ๐ Analytics โ Top endpoints, slowest requests, error rates, and percentile breakdowns
- ๐ฉบ Health Endpoint โ
/api/healthreports database and logging service status - โ๏ธ Config-first โ Everything controlled from
appsettings.jsonwith no code changes needed
๐ Quick Start
1. Install the Package
dotnet add package NetTracker.Core
2. Add Configuration to appsettings.json
{
"NetTracker": {
"Enabled": true,
"LogRequestBody": true,
"LogResponseBody": true,
"LogHeaders": true,
"Storage": {
"Type": "Database",
"ConnectionString": "Server=localhost;Database=MyAppLogs;Integrated Security=true;TrustServerCertificate=true;"
},
"Retention": {
"DaysToKeep": 30,
"AutoCleanup": true
},
"Performance": {
"UseAsyncLogging": true,
"MaxQueueSize": 10000,
"EnableCaching": true
},
"ExcludePaths": [
"/health",
"/swagger",
"/favicon.ico"
]
}
}
3. Register Services in Program.cs
var builder = WebApplication.CreateBuilder(args);
// โ
Add NET-Tracker โ one line!
builder.Services.AddNetTracker(builder.Configuration);
var app = builder.Build();
// โ
Add NET-Tracker Middleware (add before UseRouting)
app.UseNetTracker(app.Configuration);
app.UseRouting();
app.MapControllers();
app.Run();
4. Open the Dashboard
Navigate to /Dashboard in your browser.
โ๏ธ Full Configuration Reference
| Key | Type | Default | Description |
|---|---|---|---|
Enabled |
bool |
true |
Enable or disable all tracking |
LogRequestBody |
bool |
true |
Log incoming request bodies |
LogResponseBody |
bool |
true |
Log outgoing response bodies |
LogHeaders |
bool |
true |
Log request and response headers |
LogBodyOnlyOnErrors |
bool |
false |
Save bodies only on error responses (saves storage) |
MaxBodySize |
int |
1048576 |
Max body size in bytes (default 1 MB) |
IncludeQueryString |
bool |
true |
Include query string in logged URLs |
LogSensitiveData |
bool |
false |
Log sensitive data without masking |
ExcludePaths |
string[] |
["/health", ...] |
Paths to exclude from logging |
ExcludeMethods |
string[] |
[] |
HTTP methods to exclude (e.g. OPTIONS) |
Storage.ConnectionString |
string |
โ | SQL Server connection string |
Retention.DaysToKeep |
int |
30 |
How many days to keep logs |
Retention.AutoCleanup |
bool |
true |
Run automatic cleanup |
Performance.UseAsyncLogging |
bool |
true |
Non-blocking async queue writes |
Performance.MaxQueueSize |
int |
10000 |
Max in-memory queue size |
Performance.EnableCaching |
bool |
true |
Cache read queries in memory |
๐ธ Dashboard Preview
The dashboard provides:
- Overview metrics โ Total requests, error rate, avg duration, active users
- Transactions table โ Paginated, searchable list of all HTTP calls
- Request detail modal โ Full headers, body, response, timing for any transaction
- Analytics tab โ Top endpoints and slowest requests charts
- Performance tab โ P50/P95/P99 latency percentiles
- Health tab โ Live database and service health status
๐๏ธ Architecture
Request โ HttpRequestResponseLoggingMiddleware
โ
QueuedHttpTransactionLogger (async queue, Singleton)
โ (background drain)
ResilientHttpTransactionLogger (retry + circuit-breaker)
โ
HttpTransactionLogger (EF Core โ SQL Server)
๐ Requirements
- .NET 8.0+
- ASP.NET Core MVC
- SQL Server (LocalDB, Express, or full)
๐ Links
- GitHub: https://github.com/MohamedSaber2004/NET-Tracker
- NuGet: https://www.nuget.org/packages/NetTracker.Core
๐ License
This project is licensed under the MIT License โ free to use, modify, and distribute.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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.
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.