opentelemetry-instrumentation

Implement OpenTelemetry .NET SDK for distributed tracing, metrics, and logging.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/MudraMartin/dotlight-skillset --skill opentelemetry-instrumentation-mudramartin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opentelemetry-instrumentation
Source: https://github.com/MudraMartin/dotlight-skillset/tree/main/dotnet/opentelemetry-instrumentation
Command: npx skills add https://github.com/MudraMartin/dotlight-skillset --skill opentelemetry-instrumentation-mudramartin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires OpenTelemetry.Extensions.Hosting, OpenTelemetry.Exporter.OpenTelemetryProtocol, OpenTelemetry.Instrumentation.AspNetCore, OpenTelemetry.Instrumentation.Http, OpenTelemetry.Instrumentation.Runtime, OpenTelemetry.Instrumentation.SqlClient, OpenTelemetry.Instrumentation.EntityFrameworkCore, OpenTelemetry.Instrumentation.GrpcNetClient, OpenTelemetry.Instrumentation.StackExchangeRedis, Npgsql.OpenTelemetry, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill equips you with the knowledge and practices for implementing OpenTelemetry .NET instrumentation, ensuring high-quality, efficient, and compliant telemetry.

Core Features & Use Cases

  • Comprehensive Coverage: Covers tracing, metrics, logging, and resource configuration.
  • Best Practices: Delivers best practices for performance, security, and compliance.
  • Use Case: Perfect for developers who need to instrument .NET applications for observability, with a focus on OpenTelemetry.

Quick Start

Run the instrumentation command in your .NET project to automatically configure OpenTelemetry SDK with recommended settings and exporters.

Frequently Asked Questions about opentelemetry-instrumentation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I instrument a .NET application for distributed tracing and metrics collection?

OpenTelemetry .NET instrumentation provides distributed tracing, metrics collection, and logging by leveraging built-in .NET APIs for minimal overhead. It is appropriate for complex .NET applications requiring detailed observability and performance analysis.

Does OpenTelemetry .NET instrumentation work with Entity Framework Core and StackExchangeRedis?

Yes, OpenTelemetry .NET instrumentation supports Entity Framework Core and StackExchangeRedis through dedicated instrumentation libraries, enabling automatic telemetry data collection for database and caching operations.

What's the best way to configure OpenTelemetry exporters in a .NET project?

Using the OpenTelemetry.Extensions.Hosting package with the OTLP exporter library allows you to integrate distributed tracing, metrics, and logging directly into the .NET generic host pipeline for efficient telemetry data export.

Can I use OpenTelemetry to trace ASP.NET Core and gRPC requests simultaneously?

Yes, you can trace both ASP.NET Core and gRPC requests simultaneously using the OpenTelemetry.Instrumentation.AspNetCore and OpenTelemetry.Instrumentation.GrpcNetClient packages to capture end-to-end distributed traces.

Do I need specific NuGet packages to enable OpenTelemetry instrumentation for PostgreSQL?

Yes, you need the Npgsql.OpenTelemetry package to enable OpenTelemetry instrumentation for PostgreSQL operations, alongside the core OpenTelemetry .NET SDK packages for tracing and metrics collection.

Why does OpenTelemetry .NET instrumentation focus on built-in .NET APIs for performance?

OpenTelemetry .NET instrumentation leverages built-in .NET APIs to ensure minimal overhead and high performance, which is critical for complex applications requiring detailed observability without degrading runtime efficiency.