Skip to main content
Untrace C# SDK Light

Overview

The Untrace C#/.NET SDK provides zero-latency LLM observability with automatic instrumentation for all major LLM providers. Built on OpenTelemetry standards, it captures comprehensive trace data and routes it to your chosen observability platforms.

Quick Start

Start tracing LLM calls in minutes

Framework Support

ASP.NET Core, Console apps, and services

Dependency Injection

Built-in DI support for .NET applications

Examples

Real-world examples and best practices

Installation

Install the Untrace .NET SDK using the .NET CLI:
Or via Package Manager:
Or via PackageReference in your .csproj:

Quick Start

Basic Setup

Legacy Client Usage

Configuration

Configuration Options

Environment Variables

The SDK respects these environment variables:

Configuration from appsettings.json

Framework Integration

ASP.NET Core

Console Applications

Background Services

gRPC Services

Advanced Usage

LLM Activity Tracing

Activity Extensions

Custom Metrics

Error Handling

Dependency Injection

Service Registration

Service Usage

Custom Configuration

Examples

OpenAI Integration

Batch Processing

Middleware Integration

Performance

Sampling

Async Operations

Best Practices

1. Use Using Statements

2. Handle Exceptions Properly

3. Use Semantic Tags

4. Initialize Early

Troubleshooting

Common Issues

API Reference

Core Types

Extension Methods

Support

Next Steps

Dashboard Guide

Learn to use the Untrace dashboard

Configuration

Configure your observability setup

Examples

Browse C# example implementations

API Reference

Complete API documentation