agents-sdk-dotnet-otel

agents-sdk-dotnet-otel is a skill for Claude Code, Codex from microsoft/Agents. It costs 86 tokens per session (3,137 once invoked), scanned A, original, MIT.

A setup and troubleshooting guide for adding OpenTelemetry to a Microsoft 365 Agents SDK application written in C# or .NET. OpenTelemetry collects traces, metrics, and logs so you can observe how the application runs.

In plain words
What is it for?
Use it to configure and check telemetry for Agents SDK applications, including traces, metrics, logs, OTLP exporters, Application Insights, Azure Monitor, and distributed tracing.
Why use it?
It helps connect agent activity to monitoring tools and a local Aspire Dashboard without creating conflicting telemetry setups or exposing private message data.

Skill for Claude CodeCodex

Part of the agents-for-dotnet plugin — 5 skills shipped together

About the project

Microsoft 365 Agents SDK is a software toolkit for building AI agents that can communicate through channels such as Microsoft 365 Copilot, Teams, web apps, and custom applications. Developers use it to add state, storage, event handling, and channel-specific behavior while choosing their own AI services and models. The catalogue entries are skills and plugins for working with this SDK.

microsoft/Agents · 1,056 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/microsoft/agents/agents-sdk-dotnet-otel
Any agent
npx skills add microsoft/Agents --skill agents-sdk-dotnet-otel
Clone the repo
git clone --depth 1 https://github.com/microsoft/Agents

Made for: Claude Code, Codex.

Or install agents-for-dotnet, the plugin that ships this one along with the rest of its 5 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agents-sdk-dotnet-otel

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/agents/agents-sdk-dotnet-otel.svg)](https://agentmods.dev/skills/microsoft/agents/agents-sdk-dotnet-otel)
Your own site
<a href="https://agentmods.dev/skills/microsoft/agents/agents-sdk-dotnet-otel"><img src="https://agentmods.dev/badge/skills/microsoft/agents/agents-sdk-dotnet-otel.svg" alt="Measured on agentmods" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,137 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00086 $0.03137
Opus 5 $0.00043 $0.01569
Sonnet 5 $0.00017 $0.00627
Haiku 4.5 $0.00009 $0.00314

Measured 5d ago against content hash 695102e035f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agents-sdk-dotnet-otel scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (assets/start-aspire-dashboard.ps1), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agent-plugins/agents-for-net/skills/agents-sdk-dotnet-otel/SKILL.md · 408 lines

How it starts

The opening of the file, as written. The whole thing — 408 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenTelemetry for Agents SDK (.NET)

Goal

Configure traces, metrics, and logs for an Agents SDK application, including the SDK's built-in Microsoft.Agents.Core signals and a local Aspire Dashboard. Make the smallest complete change that fits the existing hosting and telemetry architecture.

Use this skill for both AgentApplication and ActivityHandler applications. The SDK telemetry source is the same for both.

Non-negotiable rules

  • Inspect the project before editing. Reuse and extend an existing AddOpenTelemetry() registration instead of creating competing providers.
  • Register telemetry before builder.Build() and before the app processes agent requests.
  • Subscribe to both AgentsTelemetry.SourceName and AgentsTelemetry.Meter; the SDK has no direct OpenTelemetry dependency and publishes through System.Diagnostics.
  • Give the application its own stable service.name. Do not use Microsoft.Agents.Core as the service name; that is an instrumentation source, not the application's identity.
  • Use OTLP environment variables rather than embedding collector URLs, headers, API keys, or connection strings in source code.
  • Never capture message text, prompts, responses, access tokens, authorization headers, cookies, secrets, attachment contents, user names, user IDs, conversation IDs, activity IDs, or arbitrary HTTP headers by default.
  • Keep metric attributes low-cardinality. Good dimensions include route type, activity type, channel ID, operation, status, and error type. Do not put per-user, per-conversation, per-message, URL, or exception-message values on metrics.
  • Do not add AlwaysOnSampler as a production default. Honor the standard OTEL_TRACES_SAMPLER and OTEL_TRACES_SAMPLER_ARG configuration.
  • Aspire Dashboard anonymous mode is local-development only. Bind its ports to loopback and do not deploy that configuration.
  • Telemetry must never swallow application exceptions or turn failures into successful results.

Read the full file on GitHub · 408 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 408 lines · 86 tokens per session scan A 695102e035f2

Subscribe to this mod's changes

agents-sdk-dotnet-otel is a skill published in the GitHub repository microsoft/Agents (1,056 stars, last pushed today), licensed MIT. It adds 86 tokens to every session and 3,137 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

azure-ai-openai-dotnet

Azure OpenAI SDK for .NET. Client library for Azure OpenAI and OpenAI services. Use for chat completions, embeddings, image generation, audio transcription, and assistants. Triggers: "Azure OpenAI", "AzureOpenAIClient", "ChatClient", "chat completions .NET", "GPT-4", "embeddings", "DALL-E", "Whisper", "OpenAI .NET".

microsoft/skills · 92 tokens

azure-eventgrid-dotnet

Azure Event Grid SDK for .NET. Client library for publishing and consuming events with Azure Event Grid. Use for event-driven architectures, pub/sub messaging, CloudEvents, and EventGridEvents. Triggers: "Event Grid", "EventGridPublisherClient", "CloudEvent", "EventGridEvent", "publish events .NET", "event-driven"…

microsoft/skills · 80 tokens

azure-maps-search-dotnet

Azure Maps SDK for .NET. Location-based services including geocoding, routing, rendering, geolocation, and weather. Use for address search, directions, map tiles, IP geolocation, and weather data. Triggers: "Azure Maps", "MapsSearchClient", "MapsRoutingClient", "MapsRenderingClient", "geocoding .NET", "route…

microsoft/skills · 91 tokens

azure-mgmt-apicenter-dotnet

Azure API Center SDK for .NET. Centralized API inventory management with governance, versioning, and discovery. Use for creating API services, workspaces, APIs, versions, definitions, environments, deployments, and metadata schemas. Triggers: "API Center", "ApiCenterService", "ApiCenterWorkspace", "ApiCenterApi", "API…

microsoft/skills · 97 tokens

azure-resource-manager-postgresql-dotnet

Azure PostgreSQL Flexible Server SDK for .NET. Database management for PostgreSQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "PostgreSQL", "PostgreSqlFlexibleServer", "PostgreSQL Flexible Server", "Azure Database for…

microsoft/skills · 97 tokens

azure-security-keyvault-keys-dotnet

Azure Key Vault Keys SDK for .NET. Client library for managing cryptographic keys in Azure Key Vault and Managed HSM. Use for key creation, rotation, encryption, decryption, signing, and verification. Triggers: "Key Vault keys", "KeyClient", "CryptographyClient", "RSA key", "EC key", "encrypt decrypt .NET", "key…

microsoft/skills · 90 tokens