https://github.com/prom-client-net/prom-client-aspnetcore
ASP.NET Core middleware
https://github.com/prom-client-net/prom-client-aspnetcore
metrics prometheus prometheus-client
Last synced: 5 months ago
JSON representation
ASP.NET Core middleware
- Host: GitHub
- URL: https://github.com/prom-client-net/prom-client-aspnetcore
- Owner: prom-client-net
- License: mit
- Created: 2018-04-22T23:10:35.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2025-12-13T04:04:07.000Z (6 months ago)
- Last Synced: 2025-12-14T16:40:13.821Z (6 months ago)
- Topics: metrics, prometheus, prometheus-client
- Language: C#
- Homepage:
- Size: 312 KB
- Stars: 9
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Prometheus.Client.AspNetCore
[](https://github.com/prom-client-net/prom-client-aspnetcore/actions/workflows/ci.yml)
[](https://www.nuget.org/packages/Prometheus.Client.AspNetCore)
[](https://www.nuget.org/packages/Prometheus.Client.AspNetCore)
[](https://app.codecov.io/gh/prom-client-net/prom-client-aspnetcore)
[](https://www.codefactor.io/repository/github/prom-client-net/prom-client-aspnetcore)
[](https://github.com/prom-client-net/prom-client-aspnetcore/blob/main/LICENSE)
Extension for [Prometheus.Client](https://github.com/prom-client-net/prom-client)
## Installation
```sh
dotnet add package Prometheus.Client.AspNetCore
```
## Use
[Examples](https://github.com/prom-client-net/prom-examples)
```c#
public void Configure(IApplicationBuilder app)
{
app.UsePrometheusServer();
}
```
```c#
public void Configure(IApplicationBuilder app)
{
app.UsePrometheusServer(q =>
{
q.MapPath = "/prom";
q.MetricPrefixName = "my_app_";
});
}
```
## Contribute
Contributions to the package are always welcome!
* Report any bugs or issues you find on the [issue tracker](https://github.com/prom-client-net/prom-client-aspnetcore/issues).
* You can grab the source code at the package's [git repository](https://github.com/prom-client-net/prom-client-aspnetcore).
## License
All contents of this package are licensed under the [MIT license](https://opensource.org/licenses/MIT).