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 (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-04-11T23:12:54.000Z (11 months ago)
- Last Synced: 2024-04-13T18:33:10.223Z (10 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
- fucking-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)
- 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
[](https://github.com/prom-client-net/prom-client-httprequestdurations/actions/workflows/ci.yml)
[](https://www.nuget.org/packages/Prometheus.Client.HttpRequestDurations)
[](https://www.nuget.org/packages/Prometheus.Client.HttpRequestDurations)
[](https://app.codecov.io/gh/prom-client-net/prom-client-httprequestdurations)
[](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).