Skip to main content

10 posts tagged with "Observability"

Seeing What an App Does in Production, with Logs, Traces, Metrics and Audit Trails

View All Tags

Fixed: No Azure Cosmos DB Traces in OpenTelemetry Even with DisableDistributedTracing = false

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

I turned on tracing in the Azure Cosmos DB .NET SDK the way Microsoft's observability page describes it: DisableDistributedTracing = false on the client, and the Azure.Cosmos.Operation source in the tracer provider. The app saved and read an item without a problem, and the Aspire Dashboard showed No traces found. One line was missing: the Azure SDK's experimental switch.

How to See a Microsoft Agent Framework Agent's Token Usage in the Aspire Dashboard

· 12 min read
Jagdish Kumawat
Founder @ Dewiride

An agent wrapped with UseOpenTelemetry records how many tokens its model calls use, as the metric gen_ai.client.token.usage, and the Aspire Dashboard charts it. Here three runs of a small agent show up there, with numbers that look wrong at first: 64 and 256, when the runs used 31 and 118 to 150 tokens. They're not wrong, though. They're bucket boundaries.

How to Trace a Microsoft Agent Framework Agent with OpenTelemetry in C#

· 13 min read
Jagdish Kumawat
Founder @ Dewiride

UseOpenTelemetry gives a Microsoft Agent Framework agent OpenTelemetry tracing: each run becomes a trace, with a span for the agent, one for each call to the model and one for each tool call. Here an agent with one tool answered a question in 6.27 s, and its trace shows where the time went and how many tokens each model call used.

How to Send ASP.NET Core Logs, Traces and Metrics to the Aspire Dashboard with OpenTelemetry

· 13 min read
Jagdish Kumawat
Founder @ Dewiride

Four OpenTelemetry packages and one UseOtlpExporter() call send an ASP.NET Core app's logs, traces and metrics to the Aspire Dashboard. This guide adds them to a small .NET 10 app, sends it requests, and reads the result on the dashboard's Structured logs, Traces and Metrics pages.

How to Trace Azure Cosmos DB Calls with OpenTelemetry in .NET C#

· 15 min read
Jagdish Kumawat
Founder @ Dewiride

The Azure Cosmos DB SDK for .NET can create an OpenTelemetry span for every read and write, but its stable releases leave that off. Turning it on takes three things: DisableDistributedTracing = false, the Azure.Cosmos.Operation source and the Azure.Experimental.EnableActivitySource switch. Without the switch, SDK 3.64.0 sent nothing at all.

How to Trace Azure SDK Calls with OpenTelemetry in .NET C#

· 12 min read
Jagdish Kumawat
Founder @ Dewiride

Azure SDK libraries for .NET create OpenTelemetry spans for their own calls, and one line, AddSource("Azure.*"), collects them all. Here a small console app asks AzureCliCredential for two tokens, and both calls show up in the Aspire Dashboard with how long they took. The Azure.Experimental.EnableActivitySource switch wasn't needed.