Anvaya.Sdk
0.1.1
dotnet add package Anvaya.Sdk --version 0.1.1
NuGet\Install-Package Anvaya.Sdk -Version 0.1.1
<PackageReference Include="Anvaya.Sdk" Version="0.1.1" />
<PackageVersion Include="Anvaya.Sdk" Version="0.1.1" />
<PackageReference Include="Anvaya.Sdk" />
paket add Anvaya.Sdk --version 0.1.1
#r "nuget: Anvaya.Sdk, 0.1.1"
#:package Anvaya.Sdk@0.1.1
#addin nuget:?package=Anvaya.Sdk&version=0.1.1
#tool nuget:?package=Anvaya.Sdk&version=0.1.1
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.
Contentis hashed into aContentRef. - 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()andFlushAsync()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 | Versions 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. |
-
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.