TraceKit.AspNetCore 0.1.1

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

TraceKit .NET SDK

NuGet License: MIT .NET

Official .NET SDK for TraceKit APM - OpenTelemetry-based distributed tracing, metrics collection, and application performance monitoring for .NET applications.

Status

Current Version: v0.1.0 ✅

The SDK is production-ready with full support for distributed tracing, metrics, and code monitoring.

Overview

TraceKit .NET SDK provides production-ready distributed tracing, metrics, and code monitoring capabilities for .NET and ASP.NET Core applications. Built on OpenTelemetry standards, it offers seamless integration with ASP.NET Core, automatic local development support, comprehensive security scanning, and a lightweight metrics API for tracking application performance.

Features

  • OpenTelemetry-Native: Built on OpenTelemetry 1.7.0 for maximum compatibility
  • Distributed Tracing: Full support for distributed trace propagation across microservices
  • Metrics API: Counter, Gauge, and Histogram metrics with automatic OTLP export
  • Code Monitoring: Live production debugging with non-breaking snapshots
  • Security Scanning: Automatic detection of sensitive data (PII, credentials)
  • Local UI Auto-Detection: Automatically sends traces to local TraceKit UI
  • ASP.NET Core Integration: Zero-configuration middleware and DI support
  • HttpClient Instrumentation: Automatic client-side span creation
  • Production-Ready: Comprehensive error handling and graceful shutdown

Installation

NuGet

For ASP.NET Core applications:

dotnet add package TraceKit.AspNetCore

For vanilla .NET applications:

dotnet add package TraceKit.Core

Quick Start

ASP.NET Core

var builder = WebApplication.CreateBuilder(args);

// Add TraceKit
builder.Services.AddTracekit(options =>
{
    options.ApiKey = Environment.GetEnvironmentVariable("TRACEKIT_API_KEY");
    options.ServiceName = "my-service";
    options.Environment = "production";
    options.EnableCodeMonitoring = true;
});

var app = builder.Build();

// Use TraceKit middleware
app.UseTracekit();

app.MapGet("/api/users", (TracekitSDK sdk) =>
{
    var counter = sdk.Counter("http.requests.total");
    counter.Inc();

    return Results.Ok(new { message = "Hello" });
});

app.Run();

Configuration (appsettings.json)

{
  "Tracekit": {
    "Enabled": true,
    "ApiKey": "ctxio_abc123...",
    "ServiceName": "my-api",
    "Environment": "production",
    "Endpoint": "app.tracekit.dev",
    "EnableCodeMonitoring": true
  }
}

Metrics API

var sdk = TracekitSDK.Create(config);

// Initialize metrics
var requestCounter = sdk.Counter("http.requests.total",
    new() { ["service"] = "api" });
var activeGauge = sdk.Gauge("http.requests.active");
var durationHistogram = sdk.Histogram("http.request.duration",
    new() { ["unit"] = "ms" });

// Use metrics
requestCounter.Inc();
activeGauge.Set(42);
durationHistogram.Record(123.45);

Code Monitoring

TraceKit enables non-breaking snapshots of your application's runtime state:

// Capture snapshot with variable state
sdk.CaptureSnapshot("checkout-start", new()
{
    ["userId"] = 123,
    ["amount"] = 99.99,
    ["status"] = "processing"
});

Features:

  • Automatic variable capture with file/line/function context
  • Built-in sensitive data detection and redaction
  • Distributed trace correlation (trace_id, span_id)
  • Zero performance impact when breakpoints are inactive

Project Structure

dotnet-sdk/
├── src/
│   ├── TraceKit.Core/              # Core SDK
│   └── TraceKit.AspNetCore/        # ASP.NET Core integration
├── tests/
│   └── TraceKit.Core.Tests/        # Unit tests
├── examples/
│   └── AspNetCore.WebApi/          # Example application
├── dotnet-test/                    # Cross-service test app
└── README.md

Development Setup

Prerequisites

  • .NET SDK 8.0 or higher
  • Git
  • TraceKit API key

Building from Source

# Clone the repository
git clone git@github.com:Tracekit-Dev/dotnet-sdk.git
cd dotnet-sdk

# Build all projects
dotnet build

# Run tests
dotnet test

# Run example app
cd examples/AspNetCore.WebApi
dotnet run

Requirements

  • .NET: 8.0 or later
  • Build Tools: .NET SDK
  • Dependencies: Managed via NuGet

Documentation

Contributing

We welcome contributions! Please see CONTRIBUTING.md for:

  • How to build and test
  • Code style guidelines
  • Pull request process
  • Development workflow

Support

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Built on OpenTelemetry - the industry standard for observability.


Repository: git@github.com:Tracekit-Dev/dotnet-sdk.git Version: v0.1.0

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

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
0.1.1 95 2/3/2026
0.1.0 100 2/3/2026