Anvaya.Sdk 0.1.1

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

Anvaya .NET SDK

AI failure observability for .NET. Send spans from your AI application and Anvaya names the failure mode and points at its origin.

System.Net.Http and System.Text.Json, both in the BCL. No package dependencies.

dotnet add package Anvaya.Sdk
await using var client = new AnvayaClient(new AnvayaOptions
{
    Environment_ = "production",   // ANVAYA_API_KEY, ANVAYA_ENDPOINT from env
});

client.Record(new SpanInput
{
    Kind = "retrieval", Name = "kb.search",
    TraceId = Wire.NewTraceId(), SpanId = Wire.NewSpanId(),
    StartedAt = DateTimeOffset.UtcNow.AddSeconds(-1),
    EndedAt = DateTimeOffset.UtcNow,
    IndexName = "refunds", DocumentsReturned = 0, TopK = 8,
});

await client.FlushAsync();

Configuration

Property Environment Default
ApiKey ANVAYA_API_KEY —
Endpoint ANVAYA_ENDPOINT required
Environment_ ANVAYA_ENVIRONMENT production
BatchSize — 256
FlushInterval — 5 s
QueueLimit — 10 000 spans

⚠️ Endpoint has no localhost default, unlike the Python SDK. A missing endpoint against a hosted control plane would otherwise send spans into a closed port and show an empty dashboard with no error anywhere.

With no API key the client is inert: no timer, no network, no exception. Spans are still validated when inert, so a malformed span fails in CI rather than only in production.

What it will not do

  • Send prompts or completions. Content is hashed into a ContentRef.
  • Retry. The server deduplicates on span id, so a retry is safe in principle — but retrying underneath a caller that also retries multiplies the send, and telemetry is not worth amplifying an outage.
  • Swallow your exceptions. Record() and FlushAsync() throw. Only the background timer swallows, because an unobserved task exception on a thread-pool thread would take the application down for a failed telemetry POST.
  • Grow without bound. Oldest-first drop, reported by DroppedSpans.

Conformance

Anvaya.Tests runs sdks/conformance/corpus.json — the same file the Node, Python and Java suites read, including key ordering.

dotnet run --project Anvaya.Tests
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.
  • net8.0

    • No dependencies.

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 176 8/9/2026
0.1.0 106 8/9/2026