A complete walkthrough of instrumenting a .NET service usingDocumentation Index
Fetch the complete documentation index at: https://docs.localops.co/llms.txt
Use this file to discover all available pages before exploring further.
prometheus-net,
the most widely adopted .NET Prometheus client.
See the overview for the general approach.
1. Add the dependency
2. Register custom metrics and expose /metrics
prometheus-net automatically registers .NET runtime metrics (GC, JIT, thread pool, exceptions) and process metrics.
KestrelMetricServer starts a standalone metrics endpoint on a dedicated port.
3. Declare the metrics endpoint in ops.json
4. Visualize with a community dashboard
| Dashboard | ID | Notes |
|---|---|---|
| prometheus-net | 10427 | Pre-built dashboard for the default metrics exposed by prometheus-net / Prometheus.AspNetCore. |
| ASP.NET Core - controller summary (Prometheus) | 10915 | Visualizes ASP.NET Core HTTP metrics provided by the prometheus-net middleware (per-controller request rates, durations). |
| Dotnet Runtime Metrics | 23179 | .NET runtime metrics dashboard supporting both .NET 9+ built-in metrics and OpenTelemetry.Instrumentation.Runtime. |
emails_sent_total, etc.) can be charted alongside.