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.
Videos
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
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.
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%
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%
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.