Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PrometheusClientNet/Prometheus.Client.HttpRequestDurations
Metrics logging of request durations for the Prometheus.Client
https://github.com/PrometheusClientNet/Prometheus.Client.HttpRequestDurations
metrics prometheus prometheus-client
Last synced: 3 months ago
JSON representation
Metrics logging of request durations for the Prometheus.Client
- Host: GitHub
- URL: https://github.com/PrometheusClientNet/Prometheus.Client.HttpRequestDurations
- Owner: prom-client-net
- License: mit
- Created: 2017-09-16T17:03:15.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-04-11T23:12:54.000Z (7 months ago)
- Last Synced: 2024-04-13T18:33:10.223Z (7 months ago)
- Topics: metrics, prometheus, prometheus-client
- Language: C#
- Homepage:
- Size: 278 KB
- Stars: 10
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-dotnet-core - Prometheus.Client.HttpRequestDurations - Metrics logging of request durations for the Prometheus.Client. (Frameworks, Libraries and Tools / Code Analysis and Metrics)
- awesome-dotnet-core - Prometheus.Client.HttpRequestDurations - Metrics logging of request durations for the Prometheus.Client. (Frameworks, Libraries and Tools / Code Analysis and Metrics)
- fucking-awesome-dotnet-core - Prometheus.Client.HttpRequestDurations - Metrics logging of request durations for the Prometheus.Client. (Frameworks, Libraries and Tools / Code Analysis and Metrics)
README
# Prometheus.Client.HttpRequestDurations
[![ci](https://img.shields.io/github/actions/workflow/status/prom-client-net/prom-client-httprequestdurations/ci.yml?branch=main&label=ci&logo=github&style=flat-square)](https://github.com/prom-client-net/prom-client-httprequestdurations/actions/workflows/ci.yml)
[![nuget](https://img.shields.io/nuget/v/Prometheus.Client.HttpRequestDurations?logo=nuget&style=flat-square)](https://www.nuget.org/packages/Prometheus.Client.HttpRequestDurations)
[![nuget](https://img.shields.io/nuget/dt/Prometheus.Client.HttpRequestDurations?logo=nuget&style=flat-square)](https://www.nuget.org/packages/Prometheus.Client.HttpRequestDurations)
[![codecov](https://img.shields.io/codecov/c/github/prom-client-net/prom-client-httprequestdurations?logo=codecov&style=flat-square)](https://app.codecov.io/gh/prom-client-net/prom-client-httprequestdurations)
[![codefactor](https://img.shields.io/codefactor/grade/github/prom-client-net/prom-client-httprequestdurations?logo=codefactor&style=flat-square)](https://www.codefactor.io/repository/github/prom-client-net/prom-client-httprequestdurations)
[![license](https://img.shields.io/github/license/prom-client-net/prom-client-httprequestdurations?style=flat-square)](https://github.com/prom-client-net/prom-client-httprequestdurations/blob/main/LICENSE)## Installation
```sh
dotnet add package Prometheus.Client.HttpRequestDurations
```## Use
There are [Examples](https://github.com/prom-client-net/prom-examples)
```c#
app.UsePrometheusRequestDurations(q =>
{
q.IncludePath = true;
q.IncludeMethod = true;
q.IgnoreRoutesConcrete = new[] // Ignore some concrete routes
{
"/favicon.ico",
"/robots.txt",
"/"
};
q.IgnoreRoutesStartWith = new[]
{
"/swagger" // Ignore '/swagger/*'
};
q.CustomNormalizePath = new Dictionary
{
{ new Regex(@"\/[0-9]{1,}(?![a-z])"), "/id" } // Replace 'int' in Route
};
});
```## 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-httprequestdurations/issues).
* You can grab the source code at the package's [git repository](https://github.com/prom-client-net/prom-client-httprequestdurations).## License
All contents of this package are licensed under the [MIT license](https://opensource.org/licenses/MIT).