# prometheus-net/prometheus-net

.NET library to instrument your code with Prometheus metrics

Repository: https://github.com/prometheus-net/prometheus-net
Canonical: https://ross.abutalabs.com/products/prometheus-net
Homepage: https://prometheus.io
Language: C#
License: MIT
License Family: permissive
Topics: prometheus, monitoring, metrics, net-standard, performance-metrics, performance-monitor, aspnetcore, grpc, grpc-request-metrics, healthchecks, httpclientfactory
Last push: 2024-04-11T13:14:54+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4179, "days_push": 874, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2094, forks 318 (observed 2026-08-28T04:06:13.116878+00:00)

## What it is
prometheus-net is a .NET library for instrumenting application code with Prometheus metrics such as counters, gauges, histograms, and summaries. It includes built-in integrations for ASP.NET Core request metrics, gRPC, IHttpClientFactory, health checks, and Pushgateway publishing.

## Use cases
- instrument a .NET application with Prometheus metrics
- expose a /metrics endpoint from ASP.NET Core
- track HTTP request duration and counts in ASP.NET Core
- collect gRPC request metrics in .NET
- push metrics to Prometheus Pushgateway
- count exceptions and track in-progress operations
- monitor HttpClient calls via IHttpClientFactory

## When to choose
- you run .NET or .NET Framework services monitored by Prometheus
- you need custom application metrics with labels and histograms
- you want built-in ASP.NET Core and gRPC metric middleware

## When to avoid
- your application is not on the .NET platform
- you need a full metrics storage and query engine rather than instrumentation (use the Prometheus server)
- you target runtimes older than .NET Framework 4.6.2 or .NET 6.0

## Facets
- artifact type: library
- maturity: active
- function: monitoring, middleware
- domain: monitoring, backend, developer-tools, apis
- platform: dotnet, cross-platform
- tags: prometheus, instrumentation, aspnetcore, counters, histograms, gauges, pushgateway, grpc-metrics, healthchecks, httpclientfactory, web-server

## Member repositories
- prometheus-net/prometheus-net (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:13.116878+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:55:26.330564+00:00, confidence not recorded.
  - readme: https://github.com/prometheus-net/prometheus-net (fetched 2026-08-28T04:06:13.116878+00:00, sha c5581d5b93db)
  - homepage: https://prometheus.io (fetched 2026-08-29T10:35:11.470108+00:00, sha 90ad2d078025)
  - site_page: https://prometheus.io/docs/introduction/overview (fetched 2026-08-29T10:35:11.478977+00:00, sha 7768d893cf39)
  - site_page: https://prometheus.io/docs/prometheus/latest/getting_started (fetched 2026-08-29T10:35:11.481098+00:00, sha 1e2a0ce5ca59)
  - site_page: https://prometheus.io/docs/concepts/data_model (fetched 2026-08-29T10:35:11.483010+00:00, sha a377e9a58b18)
  - site_page: https://prometheus.io/docs/prometheus/latest/querying/basics (fetched 2026-08-29T10:35:11.484879+00:00, sha cab4a7880e82)
  - site_page: https://prometheus.io/docs/alerting/latest/overview (fetched 2026-08-29T10:35:11.487737+00:00, sha a05282aeaa43)
  - site_page: https://prometheus.io/docs/prometheus/latest/configuration/configuration (fetched 2026-08-29T10:35:11.489650+00:00, sha eef957bb70ac)
  - site_page: https://prometheus.io/docs/instrumenting/clientlibs (fetched 2026-08-29T10:35:11.494305+00:00, sha e814512fea70)
  - site_page: https://prometheus.io/docs/instrumenting/exporters (fetched 2026-08-29T10:35:11.496136+00:00, sha 16800ed839dd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
