Menu
Documentation
Grafana Cloud
AI and machine learning
Grafana AI Observability
Get started
Instrument .NET
Grafana Cloud
Instrument .NET agents
This guide shows you how to install the AI Observability .NET SDK, instrument an LLM call, and verify that generation data reaches AI Observability.
Note
AI Observability is referred to as “Sigil” in SDKs, package names, and configuration. For example, the NuGet package is
Grafana.Sigil.
Before you begin
- A running AI Observability instance or Grafana Cloud stack with AI Observability enabled.
- .NET 8 or later.
- Your AI Observability generation export endpoint URL.
Install the SDK
Bash
dotnet add package Grafana.SigilProvider helpers are in separate packages:
Bash
dotnet add package Grafana.Sigil.OpenAI
dotnet add package Grafana.Sigil.Anthropic
dotnet add package Grafana.Sigil.GeminiCapture a generation
csharp
var sigil = new SigilClient(new SigilClientConfig
{
GenerationExport = new GenerationExportConfig
{
Protocol = GenerationExportProtocol.Http,
Endpoint = "<SIGIL_ENDPOINT>/api/v1/generations:export",
Auth = new AuthConfig
{
Mode = ExportAuthMode.Tenant,
TenantId = "<TENANT_ID>",
},
},
});
// Use provider helpers for automatic capture, for example with OpenAI:
var response = await OpenAIRecorder.CreateResponseAsync(
sigil,
openAIClient,
inputItems,
options: new OpenAISigilOptions
{
ConversationId = "conv-1",
AgentName = "my-agent",
}
);
await sigil.ShutdownAsync(CancellationToken.None);Replace SIGIL_ENDPOINT and TENANT_ID with your values.
Configure authentication
For Grafana Cloud, use basic auth:
csharp
Auth = new AuthConfig
{
Mode = ExportAuthMode.Basic,
TenantId = "<INSTANCE_ID>",
BasicPassword = "<API_KEY>",
}Verify data
Open the AI Observability plugin in Grafana and navigate to Conversations. Your generation should appear within a few seconds.
Next steps
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Video

Getting started with managing your metrics, logs, and traces using Grafana
In this webinar, we’ll demo how to get started using the LGTM Stack: Loki for logs, Grafana for visualization, Tempo for traces, and Mimir for metrics.
Video

Intro to Kubernetes monitoring in Grafana Cloud
In this webinar you’ll learn how Grafana offers developers and SREs a simple and quick-to-value solution for monitoring their Kubernetes infrastructure.
Video

Building advanced Grafana dashboards
In this webinar, we’ll demo how to build and format Grafana dashboards.
Choose a product
Scroll for more