About otel-dotnet
This skill collects references for setting up, instrumenting, and tuning OpenTelemetry in .NET services. It is for .NET developers and covers SDK configuration, APIs, automatic and manual instrumentation, and recent changes; .NET has no released declarative-config implementation yet.
Key features
- 01Guides .NET SDK and exporter setup
- 02Explains Activity, metrics, and logging instrumentation
- 03Covers zero-code and manual instrumentation
- 04References sampling, batching, and shutdown tuning
- 05Tracks API deprecations and semantic convention changes
Use cases
- 01Configure OpenTelemetry for a .NET service
- 02Add tracing, metrics, or logging instrumentation
- 03Tune sampling, export, and application shutdown
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ ollygarden/ opentelemetry-agent-skills --skill otel-dotnetAfter installing, type/otel-dotnetin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/api.mdbreaking-changes.mdinstrumentation-libraries.mdperformance.mdsetup.mdDetails
From the project READMEOpenTelemetry in .NET
Entry point for OpenTelemetry mechanics in .NET services. Load a reference below based on the task; each reference is self-contained.
References
| File | Use when |
|---|---|
references/setup.md | Setting up the SDK via the DI/builder path (AddOpenTelemetry().WithTracing/WithMetrics/WithLogging, UseOtlpExporter, OpenTelemetrySdk.Create, OpenTelemetry.Extensions.Hosting), exporter wiring, env-var / IConfiguration inputs, and why there is no released declarative YAML config in .NET. |
references/api.md | Instrumenting with native BCL APIs (ActivitySource/Activity, System.Diagnostics.Metrics.Meter, ILogger), how the SDK subscribes (AddSource/AddMeter), attributes, propagation, and the optional OTel API shim. |
references/instrumentation-libraries.md | Zero-code (the opentelemetry-dotnet-instrumentation CLR-profiler agent), the contrib instrumentation-package catalog, and manual instrumentation following semconv. |
references/performance.md | Tuning sampling (built-in samplers incl. AlwaysRecordSampler), batch export processor, periodic metric reader, views, exporter choice, async context, graceful shutdown. |
references/breaking-changes.md | Auditing existing code for deprecated/renamed APIs and semconv changes across recent core/contrib releases. |
Sources of Truth
For YAML schema details (language-agnostic), see the otel-declarative-config skill — but note
.NET does not yet have a released declarative-config implementation (see references/setup.md).
For .NET-specific facts:
| Fact | Fetch |
|---|---|
Latest OpenTelemetry core / core-* tag | gh api repos/open-telemetry/opentelemetry-dotnet/releases/latest -q '.tag_name' |
Latest NuGet package (OpenTelemetry, OpenTelemetry.Extensions.Hosting, exporters, OpenTelemetry.Instrumentation.<pkg>) | WebFetch https://www.nuget.org/packages/<PackageId> (Version) |
| Latest auto-instrumentation agent | gh api repos/open-telemetry/opentelemetry-dotnet-instrumentation/releases/latest -q '.tag_name' |
| Core CHANGELOG (per package, at the release being audited) | WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet/<core-tag>/src/<Package>/CHANGELOG.md |
| Contrib CHANGELOG (per package, at that package's release tag) | WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-contrib/<package-tag>/src/<Package>/CHANGELOG.md |
| .NET getting-started / instrumentation docs | WebFetch https://opentelemetry.io/docs/languages/dotnet/instrumentation/ |
| Zero-code agent docs | WebFetch https://opentelemetry.io/docs/zero-code/dotnet/ |
Cross-References
- Schema-level facts:
otel-declarative-configskill (language-agnostic YAML schema sources; .NET not yet implemented). - SDK version selection across languages:
otel-sdk-versionsskill. - Semantic conventions lookup:
otel-semantic-conventionsskill.