🌐
GitHub
github.com › prometheus-net › prometheus-net
GitHub - prometheus-net/prometheus-net: .NET library to instrument your code with Prometheus metrics · GitHub
Counter (existing timeseries) x100K · 10998 µs · None · prometheus-net · Histogram (existing timeseries) x100K · 957 µs · None · OpenTelemetry · Histogram (existing timeseries) x100K · 12110 µs · None · prometheus-net · Histogram (new timeseries) x1K · 716 µs · 664 KB · OpenTelemetry · Histogram (new timeseries) x1K · 350 µs · 96 KB · Some useful related projects are: prometheus-net.DotNetRuntime instruments .NET Core apps to export metrics on .NET Core performance.
Starred by 2.1K users
Forked by 317 users
Languages   C# 75.9% | JavaScript 21.9% | HTML 1.5% | CSS 0.4% | Dockerfile 0.1% | Shell 0.1%
🌐
Microsoft Learn
learn.microsoft.com › en-us › dotnet › core › diagnostics › metrics-collection
Collect metrics - .NET | Microsoft Learn
3 weeks ago - On the Graph page of the Prometheus web portal, enter hats in the expression text box and select hats_sold_Hats In the graph tab, Prometheus shows the increasing value of the "hats-sold" Counter that is being emitted by the example app.
🌐
DEV Community
dev.to › ingvarx › monitoring-your-dotnet-service-using-prometheus-2hhn
Monitoring Your Dotnet Service Using Prometheus - DEV Community
December 26, 2020 - It's good if you want to have detailed ... still a problem that metrics are not accurate. 1) Counter Counter is simple counter that only increments it's value:...
🌐
Stack Overflow
stackoverflow.com › questions › 63203589 › how-can-i-use-prometheus-counters-and-metrics-in-owinstartup-cs-in-dot-net-frame
.net - how can I use Prometheus counters and metrics in OwinStartup.cs in dot-net framework 4.6.1 - Stack Overflow
public void Configuration(IAppBuilder app) { app.UsePrometheusServer(q => { q.MapPath = "/api/metrics"; }); var counter = Metrics.CreateCounter("SampleCounter", "some help about this"); counter.Inc(5.5); } ... Find the answer to your question by asking. Ask question ... See similar questions with these tags. ... 1 How to write prometheus exporter to capture http request metrics for my application for prometheus
🌐
OneUptime
oneuptime.com › home › blog › how to create prometheus metrics in .net
How to Create Prometheus Metrics in .NET
January 25, 2026 - public interface IMetricsService { void RecordHttpRequest(string method, string path, int statusCode, double duration); void RecordDatabaseQuery(string operation, double duration); void RecordCacheHit(bool hit); void SetActiveConnections(int count); } public class PrometheusMetricsService : IMetricsService { private readonly Counter _httpRequests; private readonly Histogram _httpDuration; private readonly Histogram _dbDuration; private readonly Counter _cacheOperations; private readonly Gauge _activeConnections; public PrometheusMetricsService() { _httpRequests = Metrics.CreateCounter( "http_r
🌐
C# Corner
c-sharpcorner.com › article › reporting-metrics-to-prometheus-in-asp-net-core
Reporting Metrics To Prometheus In ASP.NET Core
April 24, 2019 - var counter = Metrics.CreateCounter("prometheus_demo_request_total", "HTTP Requests Total", new CounterConfiguration
🌐
Dotnetos
dotnetos.org › blog › 2021-11-22-dotnet-monitor-grafana
Configuring dotnet-monitor with Prometheus and Grafana - Dotnetos - courses & conferences about .NET
November 22, 2021 - And finally, very recently dotnet-trace was announced as production-ready part of .NET 6 😍 · But we are interested in /metrics endpoint. As the docs says, it “captures a snapshot of metrics of the default process in the Prometheus exposition ...
🌐
ABP
abp.io › community › articles › asp.net-core-metrics-with-.net-8.0-1xnw1apc
ASP.NET Core Metrics with .NET 8.0 | ABP.IO
MapPrometheusScrapingEndpoint: Adds the OpenTelemetry Prometheus scraping endpoint middleware to the pipeline and then we can see the all metrics by navigating to the /metrics endpoints (optional): You can use the dotnet-counters command-line tool, which allows you to view live metrics for .NET Core apps.
🌐
Microsoft Learn
learn.microsoft.com › en-us › aspnet › core › log-mon › metrics › metrics
ASP.NET Core metrics | Microsoft Learn
September 4, 2025 - You can view these metrics using dotnet-counters to monitor them in real-time or export them to Prometheus and visualize them in Grafana using the techniques described earlier in this article.
Find elsewhere
🌐
DEV Community
dev.to › rafaelpadovezi › diagnosticos-usando-dotnet-monitor-prometheus-grafana-3n7o
Diagnósticos usando dotnet-monitor + prometheus + grafana - DEV Community
January 3, 2024 - No meu último post escrevi sobre o problema de Threadpool Starvation e o uso de dotnet-counters para obter as métricas de performance de uma aplicação dotnet. Neste artigo, será usado o dotnet-monitor como ferramenta para obter diversas informações de diagnóstico de aplicações dotnet. O foco será em métricas de performance da aplicação e para facilitar a visualização será utilizado o conjunto prometheus e grafana.
🌐
Wordpress
unravellingsoftwaredevelopment.wordpress.com › hooking-up-prometheus-within-a-net-core-application
Hooking up Prometheus within a .NET Core application | Unravelling Software Development
June 29, 2019 - You can either brows for it, or run the following command in the Package manager console: Install-Package prometheus-net · In the Program.cs add the following using statement: ... Create some program logic in the main where you will be able to simulate the occurrence of successful transactions, warnings and exceptions. At these spots we will increment counters in order to generate metrics.
🌐
GitHub
github.com › prometheus-net › prometheus-net › releases
Releases · prometheus-net/prometheus-net
January 3, 2024 - Simplify DotNetStats built-in collector code for ease of readability and more best practices (#365, #364) Slightly improve Counter performance under concurrent load.
Author   prometheus-net
🌐
GitHub
github.com › dockersamples › aspnet-monitoring
GitHub - dockersamples/aspnet-monitoring: Monitoring ASP.NET Fx applications in Windows Docker containers, using Prometheus
Monitoring ASP.NET Framework applications in Windows Docker containers, using Prometheus. This sample app shows you how to export Windows and .NET Performance Counters from a Docker Windows container, run Prometheus in a Docker Windows container, and use Prometheus to monitor the ASP.NET web container:
Starred by 59 users
Forked by 32 users
Languages   JavaScript 85.3% | C# 9.8% | Dockerfile 2.3% | ASP.NET 1.8% | JavaScript 85.3% | C# 9.8% | Dockerfile 2.3% | ASP.NET 1.8%
🌐
MetaCPAN
metacpan.org › pod › Net::Prometheus::Counter
Net::Prometheus::Counter - a monotonically-increasing counter metric - metacpan.org
This class provides a counter metric - a value that monotonically increases, usually used to represent occurrences of some event that happens within the instrumented program. It is a subclass of Net::Prometheus::Metric.
🌐
Medium
aevitas.medium.com › expose-asp-net-core-metrics-with-prometheus-15e3356415f4
ASP.NET Core Metrics with Prometheus | by Martin Cerruti | Medium
December 14, 2019 - ASP.NET Core Metrics with Prometheus How to use solid metrics to know how your app performs in the wild When it comes to running production software, you’ll hardly ever find yourself in a situation …
🌐
NuGet
nuget.org › packages › prometheus-net.AspNetCore
NuGet Gallery | prometheus-net.AspNetCore 8.2.1
January 3, 2024 - By default, prometheus-net will create an exemplar with the trace_id and span_id labels based on the current distributed tracing context (Activity.Current). If using OpenTelemetry tracing with ASP.NET Core, the traceparent HTTP request header will be used to automatically assign Activity.Current. private static readonly Counter TotalSleepTime = Metrics .CreateCounter("sample_sleep_seconds_total", "Total amount of time spent sleeping."); ...
🌐
GitHub
github.com › alexvaluyskiy › prometheus-net-contrib
GitHub - alexvaluyskiy/prometheus-net-contrib: Exposes .NET core diagnostic listeners and counters
November 30, 2016 - A plugin for the prometheus-net package, exposing event counters and diagnostic listeners for .NET Core Runtime, ASP.NET Core, SignalR, GRPC, etc. Supports .NET core v3.0+ only. Add the package from nuget: dotnet add package prometheus-net.Contrib · And then start the collectors: public class Startup { public void ConfigureServices(IServiceCollection services) { ...
Starred by 49 users
Forked by 8 users
Languages   C# 100.0% | C# 100.0%
🌐
DEV Community
dev.to › ryck › introduction-a-prometheus-en-net-5cdg
Introduction à Prometheus en .NET - DEV Community
September 10, 2023 - dotnet add package Prometheus-net.AspNetCore · Prometheus propose différents types de mesures : Counters : Les compteurs augmentent seulement en valeur et sont remis à zéro lorsque le processus redémarre.
🌐
Dotnetwisdom
dotnetwisdom.co.uk › 2025 › 09 › 28 › from-debugging-to-diagnostics-mastering-dotnet-monitor-counters-and-dumps-in-net-8
From Debugging to Diagnostics: Mastering dotnet-monitor, Counters, and Dumps in .NET 8 – Software Architecture and AI Consultancy
October 1, 2025 - Similarly, hitting /metrics would return a plaintext document of metrics in a format that Prometheus can scrape. For example, you’d see lines like: # HELP process_cpu_usage_cpu_percent CPU usage of the process. # TYPE process_cpu_usage_cpu_percent gauge process_cpu_usage_cpu_percent 35.7 # HELP dotnet_gc_heap_size_bytes Total GC heap size in bytes.
🌐
rafaelldi blog
rafaelldi.blog › posts › counters-and-metrics
What does the .NET application say - Counters and Metrics - rafaelldi blog
June 2, 2022 - I think that dotnet-counters is a handy tool to quickly analyse what’s going on with your application. Of course, more sophisticated solutions as Prometheus or OpenTelemetry should be used in production.