PowerTraces.Sdk 1.0.1

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

PowerTraces.Sdk

OpenTelemetry for ASP.NET Core, set up for PowerTraces in one line.

Install

dotnet add package PowerTraces.Sdk

Use

var builder = WebApplication.CreateBuilder(args);
builder.AddPowerTraces();

Set the same variables you would for any OpenTelemetry exporter. Copy them from Docs → Get started in PowerTraces; they already hold your workspace's endpoint.

OTEL_SERVICE_NAME=checkout-api
OTEL_EXPORTER_OTLP_ENDPOINT=<your gRPC endpoint>
OTEL_EXPORTER_OTLP_PROTOCOL=grpc
OTEL_EXPORTER_OTLP_HEADERS=X-Otel-Api-Key=<your key>,X-Otel-Api-Secret=<your secret>
OTEL_RESOURCE_ATTRIBUTES=deployment.environment=production,service.version=1.4.2

Without an endpoint, key and secret the app runs normally, sends nothing and logs one warning.

What you get

Traces ASP.NET Core, HttpClient, Npgsql and MongoDB spans, with clean route and SQL names
Logs ILogger output with the trace it belongs to
Metrics Request, HttpClient and runtime metrics, when your plan includes them
Security Request and response headers, with Authorization, cookies and API keys redacted
Users user.id, user.name and user.role from the signed-in user
Dependency checks The app's NuGet packages, sent on startup and every 6 hours, checked against known vulnerabilities

Options

builder.AddPowerTraces(o =>
{
    o.ServiceName = "checkout-api";
    o.AdditionalSensitiveHeaders.Add("X-Customer-Token");
    o.EnableSqlStatementCapture = true;
    o.ConfigureTracing = tracing => tracing.AddSource("Checkout");
});
Option Default
Endpoint, ApiKey, ApiSecret from OTEL_EXPORTER_OTLP_* Or POWERTRACES_ENDPOINT, POWERTRACES_API_KEY, POWERTRACES_API_SECRET
ServiceName OTEL_SERVICE_NAME, then the app's name
EnableLogs, EnableMetrics true
EnableDependencyReporting true Sends the package list for vulnerability checks
EnableUserAttributes true Replace the claims lookup with EnrichWithUser
AdditionalSensitiveHeaders empty Redacted on top of the built-in list
EnableSqlStatementCapture false Keeps SQL text on database spans
EnableRequestBodyCapture false First 2 KB of JSON, form and text bodies. Test environments only
ConfigureTracing, ConfigureMetrics none Add your own sources, meters or processors

Supports .NET 8 and later.

Product 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 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.1 154 10/23/2026
1.0.0 123 10/23/2026