Skip to content

Repository files navigation

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.

About

HTTP request durations

Topics

Resources

Stars

11 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages