Skip to main content

11 posts tagged with "OpenTelemetry"

OpenTelemetry, the Open Standard for Logs, Traces and Metrics, and Its SDKs and Exporters

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.

Fixed: "Endpoint is unsecured. Untrusted apps can send telemetry to the dashboard." in the Aspire Dashboard

· 16 min read
Jagdish Kumawat
Founder @ Dewiride

I started the Aspire Dashboard with the Aspire CLI to watch an ASP.NET Core API's telemetry, and a red banner sat on top of the page: Endpoint is unsecured. Untrusted apps can send telemetry to the dashboard. The dashboard's telemetry endpoint accepts data from any app until you give it an API key. A key removed the banner, and from then on the API had to send the same key, or its telemetry was turned away without a single error in the API.

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.