Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 2.15 KB

File metadata and controls

50 lines (39 loc) · 2.15 KB

Prometheus.Client.HttpRequestDurations

ci nuget nuget codecov license

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!

License

All contents of this package are licensed under the MIT license.