LeoTrace.Core 1.0.36

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

LeoTrace

Distributed HTTP request tracing for .NET and Node.js — streams live traces to a real-time dashboard via SignalR.

NuGet npm License: MIT


✨ 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed