Agent skill

configuring-opentelemetry-dotnet

Configure OpenTelemetry distributed tracing, metrics, and logging in ASP.NET Core using the .NET OpenTelemetry SDK. Use when adding observability, setting up OTLP exporters, creating custom metrics/spans, or troubleshooting distributed trace correlation.

.NET Platform4,927★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add dotnet/skills --skill configuring-opentelemetry-dotnet --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 11 KB
Bundled scripts: none
Path: plugins/dotnet-aspnetcore/skills/configuring-opentelemetry-dotnet/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,927
Language: C#
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Configuring OpenTelemetry in .NET ## When to Use - Adding distributed tracing to an ASP.NET Core application - Setting up OpenTelemetry exporters (OTLP is the primary protocol; Jaeger accepts OTLP natively; Prometheus OTLP ingestion requires explicit opt-in) - Creating custom metrics or trace spans for business operations - Troubleshooting distributed trace context propagation across services ## When Not to Use - The user wants application-level logging only (use ILogger, Serilog) - The user is using Application Insights SDK directly (different API) - The user needs APM with a commercial vendor's proprietary SDK ## Inputs | Input | Required | Description | |-------|----------|-------------| | ASP.NET Core project | Yes | The application to instrument | | Observability backend | No | Where to export: OTLP collector, Aspire dashboard, Jaeger (accepts OTLP natively) | ## Workflow ### Step 1: Install the correct packages **There are many OpenTelemetry NuGet packages. Install exactly these:** ```bash # Core SDK + ASP.NET Core instrumentation + logging integration dotnet add package OpenTelemetry.Extensions.Hosting dotnet add package OpenTelemetry.Instrumentation.AspNetCore dotnet add

What's inside
Steps it walks through
  1. When to Use
  2. When Not to Use
  3. Inputs
  4. Workflow
  5. Step 1: Install the correct packages
  6. Step 2: Configure all signals in Program.cs
  7. Step 3: Understanding log–trace correlation
  8. Step 4: Create custom spans (Activities) for business operations
  9. Step 5: Create custom metrics
  10. Step 6: Configure context propagation for distributed scenarios
  11. Validation
  12. Common Pitfalls
Commands it runs
Core SDK + ASP.NET Core instrumentation + logging integration
dotnet add package OpenTelemetry.Extensions.Hosting
dotnet add package OpenTelemetry.Instrumentation.AspNetCore
dotnet add package OpenTelemetry.Instrumentation.Http
Exporter
dotnet add package OpenTelemetry.Exporter.OpenTelemetryProtocol  # OTLP exporter for traces, metrics, AND logs
Optional — dev/local debugging only (do NOT include in production deployments)
dotnet add package OpenTelemetry.Exporter.Console
dotnet add package OpenTelemetry.Instrumentation.SqlClient           # SQL Server queries
dotnet add package OpenTelemetry.Instrumentation.EntityFrameworkCore  # EF Core
More from skills
All skills →
About this skill
What does the configuring-opentelemetry-dotnet skill do?

Configure OpenTelemetry distributed tracing, metrics, and logging in ASP.NET Core using the .NET OpenTelemetry SDK. Use when adding observability, setting up OTLP exporters, creating custom metrics/spans, or troubleshooting distributed trace correlation.

How do I install it?

Run `npx skills add dotnet/skills --skill configuring-opentelemetry-dotnet --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going