Awesome
Prometheus.Client.HttpRequestDurations
Installation
dotnet add package Prometheus.Client.HttpRequestDurations
Use
There are Examples
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<Regex, string>
{
{ 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.
- You can grab the source code at the package's git repository.
License
All contents of this package are licensed under the MIT license.