Home

Awesome

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.