CodeTorch.Diagnostics.SDK 0.1.0

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

CodeTorch.Diagnostics SDK

CodeTorch.Diagnostics is a lightweight .NET diagnostics forwarding package used by CodeTorch-integrated applications to send session-scoped frontend/backend diagnostic payloads to a hosted receiver.

Purpose

  • Create short-lived diagnostic sessions.
  • Queue and forward diagnostic events to the receiver in a non-blocking way.
  • Keep requests responsive by using fire-and-forget processing and bounded in-memory buffering.
  • Keep retry policy and transport options centralized in configuration.

Usage

Add package references in your API project:

<PackageReference Include="CodeTorch.Diagnostics.SDK" Version="0.1.0" />

Register the client in Program.cs:

builder.Services.AddCodeTorchDiagnostics(builder.Configuration);

Then resolve IDiagnosticsForwarder where needed:

var sessionId = await forwarder.CreateSessionAsync(new DiagnosticSessionCreateRequest
{
    SourceSystem = "MyApp",
    SourceEnvironment = "dev"
});

forwarder.QueueEvent(sessionId.Value, new DiagnosticEvent
{
    Source = "frontend",
    Type = "log",
    Level = "info",
    Message = "Button clicked"
});

Configuration

"CodeTorchDiagnostics": {
  "Enabled": true,
  "ReceiverBaseUrl": "https://portal-api.my-org.com",
  "SessionsRoute": "api/diagnostics/sessions",
  "ApiKey": "...optional...",
  "ApiKeyHeaderName": "X-Codetorch-ApiKey"
}

Set Enabled to false to keep all calls no-op.

Notes

  • Transport is intentionally fire-and-forget and never throws to callers in regular log paths.
  • The package forwards via HTTP/JSON to the diagnostics API endpoints.
Product Compatible and additional computed target framework versions.
.NET 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
0.1.0 1,367 2/18/2026