
A checkout request is slow. The Orders API returned a response; the Inventory API was involved, and you need to find the operation that held up the request. In this OpenTelemetry for .NET course, you’ll instrument ASP.NET Core APIs and follow that checkout across services. You’ll use Jaeger to read a distributed trace, Prometheus and PromQL to investigate latency, and Grafana to compare the evidence.
I start with a log you might see during an incident and work through what it can tell you. A log can describe a specific event. A metric can show whether the slowdown affected more than one request. A trace can show which operations ran and how their timing relates. Once you know what to look for in each signal, we’ll add instrumentation to a C# API and generate the telemetry ourselves.
Add OpenTelemetry to an ASP.NET Core API
You’ll start with a small API and use the console exporter to check what it emits. This lets you verify your instrumentation while still seeing the API and its output side by side. You’ll review where ASP.NET Core records incoming HTTP work and where HttpClient instrumentation applies to calls the API makes to other services. The course also explains how to enable additional .NET runtime metrics and what to check for in the output.
Then you’ll use ActivitySource to name a business operation and add a custom span for order processing. You’ll use a Meter and a counter to track processed orders. I’ll show where information such as an order ID belongs when you need it to investigate an individual request, and why a metric label should have a bounded set of values. With a per-order label, each distinct order ID can create a new time series.
Send and verify telemetry locally
You’ll use Docker Compose to run Jaeger and Prometheus on your machine. The API sends traces using OTLP and exposes a metrics endpoint for Prometheus to scrape. Follow the setup far enough to verify both sides. Find a trace for a request you sent, then check that Prometheus can reach the API’s scrape target.
The target status page is a useful checkpoint when you see an empty graph. The setup walkthrough shows a target that starts out down. You’ll see how to check the API’s listening port against the scrape configuration and confirm when Prometheus can reach it. The trace and scrape checks also give you a way to isolate a problem before you start changing dashboard queries.
I explain what OTLP transports are, how service names and other resource attributes identify the source of telemetry, and what receivers, processors, and exporters do in an OpenTelemetry Collector pipeline. The labs use the local backends directly. The Collector lesson gives you enough context to understand where a Collector can fit when you need a separate pipeline.
Investigate the slow request in Jaeger
Once the single API is emitting telemetry, you’ll work with two services in the sample checkout, Orders and Inventory. You’ll send a request across the two APIs, look up the resulting trace, and use Jaeger’s duration filter to narrow the results. Then you’ll read the waterfall and follow the parent-child relationships between spans.
A trace search can return several slow requests in the same time window. I’ll show how to pick one to inspect and read its spans in the order they ran. Look at where the time is spent in that request before you decide which service or operation to investigate next.
The sample includes a simulated database delay. You can see the slow operation in the trace and point to the span that supports your diagnosis. I’ll also explain what W3C Trace Context carries across a service boundary and why span names and attributes matter when several operations appear in the same trace.
Read .NET metrics in Prometheus
You’ll configure Prometheus to scrape both APIs and verify that both targets are up. In PromQL, you’ll look at how much time outgoing HTTP requests spend waiting for a connection. You’ll then estimate p95 server latency from the exported histogram buckets. Filtering the same query to successful checkout requests shows how much the result depends on which requests you include.
The RED lesson explains how request rate, errors, and duration can help you choose what to check next. If duration rises, you can look for the affected operation in a trace. If errors rise as well, that gives you a different lead to investigate. The PromQL walkthrough focuses on the queue-wait and latency queries so you can read each result in context.
Build a Grafana panel and compare it with a trace
You’ll connect Prometheus and Jaeger as Grafana data sources, build a latency panel, and note the time window around a change. In Grafana Explore, you’ll use the Jaeger data source to search manually for a representative checkout trace in that window. This lets you compare an aggregate signal with one request and identify the slow span that is worth a closer look.
The final lesson shows how to put the evidence into an incident timeline. Record the affected route and time window, the metric change, the trace ID, and the suspected span. If you have logs for that trace, use them to check what happened inside the operation. Finish by writing down what you would test before calling the suspected cause confirmed.
Who should take this course
I designed this for C# developers and backend engineers who build or maintain ASP.NET Core APIs. You should be comfortable reading a minimal API, editing C# and running commands in a terminal. You can start with no OpenTelemetry, Jaeger, Prometheus or Grafana experience.
Use a computer that can run the .NET 10 SDK and Docker Compose. I use Visual Studio Code in the walkthroughs, and you can follow along with another C# editor. The setup lesson shows how to check which SDK is installed before you start the exercises. The course has 21 short video lessons across five sections, with English captions.