PowerTraces 3.0.0

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

PowerTraces

The base package for exporting OpenTelemetry traces and logs straight to a database via a connection string — no collector, no EF Core. Tables/collections are created automatically on first use.

This package is database-agnostic on its own — it defines the shapes (IStorageWriter, IDashboardStore) and the shared exporter plumbing. To actually write anywhere, add one of the provider packages:

Package Database
PowerTraces.MSSQL SQL Server
PowerTraces.PostgreSQL PostgreSQL
PowerTraces.MongoDb MongoDB
PowerTraces.MySQL MySQL / MariaDB
PowerTraces.Sqlite SQLite (a local file, no database server)

And to see what's collected, add PowerTraces.Dashboard — an embedded traces/logs viewer UI you mount with one line.

Quick start

// after: dotnet add package PowerTraces.MSSQL
builder.Services.AddOpenTelemetry()
    .WithTracing(t => t.AddPowerTracesMsSqlExporter(connectionString))
    .WithLogging(l => l.AddPowerTracesMsSqlExporter(connectionString));

That's it — spans and logs start landing in SQL Server under the powertraces schema, tables created automatically.

Extending to another database

Implement IStorageWriter (write side) and, if you also want dashboard support, IDashboardStore (read side) — both defined in this package. Then either call the generic entry point directly:

tracing.AddPowerTracesExporter(new MyStorageWriter(options), options);

or package it up the same way the built-in providers do: a small AddPowerTracesMyDbExporter(...) extension method, plus AddPowerTracesMyDbDashboard(...) registering your IDashboardStore under a DI key so PowerTraces.Dashboard can resolve it.

Optional pieces the built-in providers all implement:

  • IIgnoreRuleSource on the writer (and IIgnoreRuleStore on the dashboard store) — the exporter then applies ignore rules created from the dashboard. Read them through IgnoreRuleCache so an export doesn't cost a query.
  • IStorageWriter.DeleteTracesAsync — purges spans already written for a trace whose root turns out to be ignored.
  • IDashboardStore.GetOverviewAsync — the Overview page's charts.

For another SQL database, most of this is already written: derive from SqlDashboardStore with your own SqlDialect (quoting, paging, LIKE escaping, time bucketing) and reuse SqlIgnoreRules; only the writer and the DDL are yours to write. TraceSummary.FromBatch gives you the per-trace summary rows the shared queries read, and SqlAttributeKeys.RecordAsync keeps the attribute-key list up to date. Your dialect's JsonAttributeText is how attribute filters read the JSON.

License

Free for any use, including commercial use, under the PowerTraces Free License (LICENSE.txt in this package): you may use it and ship it unmodified inside your applications, but not modify the code or publish changed copies.

Product Compatible and additional computed target framework versions.
.NET 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 (6)

Showing the top 5 NuGet packages that depend on PowerTraces:

Package Downloads
PowerTraces.Dashboard

Traces/logs viewer UI + query API for the PowerTraces exporter. Mount with app.MapPowerTracesDashboard(connectionString) — no DI registration needed, the UI is embedded in the package.

PowerTraces.MSSQL

SQL Server provider for PowerTraces — exports traces/logs straight to SQL Server via connection string, no EF Core, tables created automatically.

PowerTraces.PostgreSQL

PostgreSQL provider for PowerTraces — exports traces/logs straight to PostgreSQL via connection string, no EF Core, tables created automatically.

PowerTraces.MySQL

MySQL/MariaDB provider for PowerTraces — exports traces/logs straight to MySQL via connection string, no EF Core, tables created automatically.

PowerTraces.MongoDb

MongoDB provider for PowerTraces — exports traces/logs straight to MongoDB via connection string, no EF Core, collections/indexes created automatically.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 69 11/12/2026