LeoTrace.Core
1.0.36
dotnet add package LeoTrace.Core --version 1.0.36
NuGet\Install-Package LeoTrace.Core -Version 1.0.36
<PackageReference Include="LeoTrace.Core" Version="1.0.36" />
<PackageVersion Include="LeoTrace.Core" Version="1.0.36" />
<PackageReference Include="LeoTrace.Core" />
paket add LeoTrace.Core --version 1.0.36
#r "nuget: LeoTrace.Core, 1.0.36"
#:package LeoTrace.Core@1.0.36
#addin nuget:?package=LeoTrace.Core&version=1.0.36
#tool nuget:?package=LeoTrace.Core&version=1.0.36
LeoTrace
Distributed HTTP request tracing for .NET and Node.js — streams live traces to a real-time dashboard via SignalR.
✨ What is LeoTrace?
LeoTrace automatically captures every incoming and outgoing HTTP request in your services, records them to a database, and streams them live to a central dashboard — all with zero manual instrumentation.
Your Service (C#/.NET or Node.js)
↓ auto-captured by middleware
LeoTrace.Server (dashboard + API)
↓ real-time push via SignalR
Browser Dashboard → live trace timeline
🚀 Quick Start
1. Run the LeoTrace Server
docker run -d \
-p 5050:5050 \
-e LeoTrace__Storage__Provider=MongoDb \
-e LeoTrace__Storage__MongoConnectionString=mongodb://mongo:27017 \
--name leotrace-server \
leventleo/leotrace-server:latest
Dashboard → http://localhost:5050
Or with Docker Compose:
docker compose -f docker-compose.yml up -d
2a. .NET / ASP.NET Core Integration
dotnet add package LeoTrace.Core
dotnet add package LeoTrace.Storage
// Program.cs
builder.Services.Configure<LeoTraceOptions>(builder.Configuration.GetSection("LeoTrace"));
builder.Services.AddLeoTraceStorage();
builder.Services.AddLeoTrace(opt =>
{
opt.ServiceName = "OrderService";
opt.ExcludedPaths = ["/health", "/metrics"];
});
var app = builder.Build();
app.UseLeoTrace(); // ← add before MapControllers
app.MapControllers();
app.Run();
// appsettings.json
{
"LeoTrace": {
"ServiceName": "OrderService",
"ServerUrl": "http://localhost:5050",
"Storage": {
"Provider": "MongoDb",
"MongoConnectionString": "mongodb://localhost:27017",
"MongoDatabaseName": "leotrace"
}
}
}
2b. Node.js / Express Integration
npm install leotrace-node
const express = require('express');
const { createLeoTrace } = require('leotrace-node');
const app = express();
const leo = createLeoTrace({
serverUrl: 'http://localhost:5050',
serviceName: 'express-api',
});
app.use(leo.expressMiddleware()); // ← before your routes
app.get('/users', (req, res) => res.json([{ id: 1 }]));
app.listen(3000);
2c. Next.js Integration
App Router:
// app/api/orders/route.js
import { createLeoTrace } from 'leotrace-node';
const leo = createLeoTrace({ serverUrl: 'http://localhost:5050', serviceName: 'nextjs-app' });
export const GET = leo.withLeoTrace(async (req) => Response.json({ orders: [] }));
Pages Router:
// pages/api/products.js
import { createLeoTrace } from 'leotrace-node';
const leo = createLeoTrace({ serverUrl: 'http://localhost:5050', serviceName: 'nextjs-app' });
export default leo.withLeoTraceApi(async (req, res) => res.json({ products: [] }));
2d. Nuxt 3 Integration
// server/middleware/leotrace.js
import { createLeoTrace } from 'leotrace-node';
const leo = createLeoTrace({ serverUrl: 'http://localhost:5050', serviceName: 'nuxt-app' });
export default leo.nuxtMiddleware();
⚙️ Configuration Reference
.NET LeoTraceOptions
| Property | Default | Description |
|---|---|---|
ServiceName |
"UnknownService" |
Service label in dashboard |
ServerUrl |
null |
LeoTrace.Server URL |
CaptureRequestBody |
true |
Record request bodies |
CaptureResponseBody |
true |
Record response bodies |
MaxBodySizeBytes |
8192 |
Body truncation limit |
ExcludedPaths |
["/health","/metrics","/favicon.ico"] |
Paths to skip |
Storage.Provider |
auto-detect | Sqlite | SqlServer | PostgreSql | MongoDb | CosmosDb |
Node.js createLeoTrace Options
| Option | Default | Description |
|---|---|---|
serverUrl |
required | LeoTrace.Server URL |
serviceName |
"NodeApp" |
Service label in dashboard |
captureBody |
true |
Record request/response bodies |
maxBodySize |
8192 |
Body truncation limit |
excludedPaths |
["/health","/metrics","/favicon.ico"] |
Paths to skip |
🗄️ Supported Storage Backends
| Provider | Config Key |
|---|---|
| SQLite (default, zero config) | SqliteFilePath |
| SQL Server | SqlConnectionString |
| PostgreSQL | PostgresConnectionString |
| MongoDB | MongoConnectionString + MongoDatabaseName |
| Azure CosmosDB | CosmosConnectionString + CosmosDatabaseName + CosmosContainerName |
Storage is auto-detected from connection strings. If none found, SQLite is used as fallback.
🔄 Distributed Trace Propagation
When requests flow through multiple services, LeoTrace links them via X-Trace-Id header:
Client → ServiceA (TraceId=abc) → ServiceB (TraceId=abc) → ServiceC (TraceId=abc)
↓ All appear as one unified flow in dashboard
This propagation is automatic in both .NET (LeoTraceHandler) and Node.js SDK.
🎯 Replay & Simulate
From the dashboard or REST API:
# Re-execute a real HTTP request
POST /api/replay/{stepId}?traceId={traceId}
# Replay without making a real request (simulated)
POST /api/replay/{stepId}/simulate?traceId={traceId}
🐳 Docker Compose (Full Stack)
docker compose up -d
See docker-compose.yml in the repository root.
📄 License
MIT © Levent Topcu
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 is compatible. 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. |
-
net6.0
- Castle.Core (>= 5.1.1)
- Microsoft.AspNetCore.Http (>= 2.3.9)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.9)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.6)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 10.0.6)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.6)
-
net7.0
- Castle.Core (>= 5.1.1)
- Microsoft.AspNetCore.Http (>= 2.3.9)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.9)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.6)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 10.0.6)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.6)
-
net8.0
- Castle.Core (>= 5.1.1)
- Microsoft.AspNetCore.Http (>= 2.3.9)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.9)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.6)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 10.0.6)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.6)
-
net9.0
- Castle.Core (>= 5.1.1)
- Microsoft.AspNetCore.Http (>= 2.3.9)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.9)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.6)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Http (>= 10.0.6)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.6)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on LeoTrace.Core:
| Package | Downloads |
|---|---|
|
LeoTrace.Storage
Multi-database storage adapters for LeoTrace: MongoDB, SQLite, SQL Server, PostgreSQL, Azure CosmosDB. |
|
|
LeoTrace.Server
LeoTrace Dashboard & API Server. This application hosts the UI and ingestion endpoints for tracing data. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.36 | 100 | 4/27/2026 |
| 1.0.35 | 91 | 4/27/2026 |
| 1.0.34 | 87 | 4/27/2026 |
| 1.0.33 | 98 | 4/27/2026 |
| 1.0.32 | 109 | 4/23/2026 |
| 1.0.31 | 107 | 4/23/2026 |
| 1.0.30 | 95 | 4/22/2026 |
| 1.0.29 | 96 | 4/22/2026 |
| 1.0.28 | 92 | 4/22/2026 |
| 1.0.27 | 90 | 4/22/2026 |
| 1.0.26 | 120 | 4/22/2026 |
| 1.0.24 | 102 | 4/22/2026 |
| 1.0.23 | 86 | 4/22/2026 |
| 1.0.22 | 88 | 4/22/2026 |
| 1.0.21 | 93 | 4/22/2026 |
| 1.0.20 | 98 | 4/22/2026 |
| 1.0.19 | 93 | 4/22/2026 |
| 1.0.18 | 97 | 4/22/2026 |
| 1.0.17 | 97 | 4/22/2026 |
| 1.0.16 | 100 | 4/21/2026 |