explaingit

open-telemetry/opentelemetry-dotnet

Analysis updated 2026-07-03

3,697C#Audience · developerComplexity · 3/5Setup · moderate

TLDR

Official C# and .NET library for OpenTelemetry that lets .NET apps collect logs, metrics, and traces and send them to monitoring tools like Grafana or Jaeger.

Mindmap

mindmap
  root((repo))
    What it does
      Collects logs
      Collects metrics
      Collects traces
    Tech stack
      C# and dotnet
      NuGet packages
      ASP.NET Core
    Use cases
      Monitor web apps
      Send to Jaeger
      Expose Prometheus
    Audience
      Backend devs
      DevOps engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add distributed tracing to an ASP.NET Core web app to track how requests move through your services.

USE CASE 2

Export logs and metrics from a .NET app to Grafana or Jaeger for real-time monitoring and alerting.

USE CASE 3

Hook OpenTelemetry into an existing ILogger-based app without changing any log call code.

USE CASE 4

Use the in-memory exporter in tests to assert that specific traces and metrics are emitted correctly.

What is it built with?

C#.NETASP.NET CoreNuGetOTLPPrometheus

How does it compare?

open-telemetry/opentelemetry-dotnetskydevil88/xboxdownloaddotnet/samples
Stars3,6973,6943,709
LanguageC#C#C#
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 5min

Requires choosing and configuring an exporter such as an OTLP endpoint or Prometheus scrape target to receive the telemetry data.

In plain English

OpenTelemetry .NET is the official C# and .NET library for the OpenTelemetry standard. OpenTelemetry is an industry standard for collecting three kinds of observability data from software applications: logs (text records of what happened), metrics (numerical measurements over time), and traces (records of how a request moved through your system). This library gives .NET applications the tools to collect that data and send it somewhere useful, such as a monitoring dashboard or an alerting system. The library is stable across all three signals. It is distributed as a set of NuGet packages, which is the standard way to add dependencies to .NET projects. The main packages cover the API (the interfaces your application code calls), the SDK (the implementation that processes and exports the data), and hosting extensions for ASP.NET Core applications. There are also separate exporter packages for sending data to different destinations: a console output for development, an in-memory store for testing, the OTLP protocol for sending to systems like Jaeger or Grafana, and Prometheus endpoints for scraping by monitoring tools. For applications already using the standard .NET logging interface (ILogger), the library hooks in without requiring code changes to your log calls. Getting started guides exist separately for ASP.NET Core web applications and for command-line console programs, each described as taking about five minutes to complete. The repository covers only what the OpenTelemetry specification defines. Additional instrumentation libraries for specific frameworks (like HTTP clients or database drivers) and additional exporters are in a companion repository called opentelemetry-dotnet-contrib. The project supports all currently supported versions of .NET and .NET Framework, with the exception of .NET Framework 3.5.

Copy-paste prompts

Prompt 1
Set up OpenTelemetry tracing in my ASP.NET Core app using opentelemetry-dotnet. Show me which NuGet packages to install and the minimal configuration to export traces via OTLP to Jaeger.
Prompt 2
Using opentelemetry-dotnet, how do I collect custom metrics from a .NET console app and expose a Prometheus scrape endpoint? Show a minimal working example.
Prompt 3
I have an ASP.NET Core app that uses ILogger. Show me how to wire up opentelemetry-dotnet so my existing log calls are captured and sent to a remote monitoring system without modifying any log statements.
Prompt 4
Write an integration test for a .NET service that uses opentelemetry-dotnet's in-memory exporter to verify that a specific span is created when a certain method is called.
Prompt 5
Show me how to configure opentelemetry-dotnet to send traces, metrics, and logs from a single ASP.NET Core app to an OTLP-compatible backend using minimal boilerplate.

Frequently asked questions

What is opentelemetry-dotnet?

Official C# and .NET library for OpenTelemetry that lets .NET apps collect logs, metrics, and traces and send them to monitoring tools like Grafana or Jaeger.

What language is opentelemetry-dotnet written in?

Mainly C#. The stack also includes C#, .NET, ASP.NET Core.

How hard is opentelemetry-dotnet to set up?

Setup difficulty is rated moderate, with roughly 5min to a first successful run.

Who is opentelemetry-dotnet for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub open-telemetry on gitmyhub

Verify against the repo before relying on details.