Skip to main content

Posts

Showing posts with the label OpenTelemetry C#

OpenTelemetry .NET Tutorial: Distributed Tracing Guide

Learn OpenTelemetry .NET step by step: set up distributed tracing, metrics, and logs in ASP.NET Core with runnable C# examples. Start tracing today! A single request in a modern .NET app can pass through an API gateway, three microservices, a message queue, and a database before it returns. When that request becomes slow or fails, log files alone rarely tell you why. OpenTelemetry .NET fixes this. It gives you one vendor-neutral way to collect distributed traces , metrics , and logs from your C# applications. It works with any backend, including Jaeger, Grafana, Prometheus, Azure Monitor, Datadog, Honeycomb, and the .NET Aspire dashboard. This guide covers OpenTelemetry in ASP.NET Core from scratch. You'll learn how distributed tracing works, how to add custom spans and metrics, how to carry trace context through message queues, and which best practices matter in production. It also explains why each piece exists, so you can make good decisions in your own systems. What Is...