/// <summary>
 /// Registers a Timer metric named "Owin.Requests" that records how many requests per second are handled and also
 /// keeps a histogram of the request duration.
 /// </summary>
 /// <param name="metricName">Name of the metric.</param>
 public OwinRequestMetricsConfig WithRequestTimer(string metricName = "Requests")
 {
     var metricsMiddleware = new RequestTimerMiddleware(this.metricsContext, metricName, this.ignoreRequestPathPatterns);
     middlewareRegistration(metricsMiddleware);
     return this;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Registers a Timer metric named "Owin.Requests" that records how many requests per second are handled and also
 /// keeps a histogram of the request duration.
 /// </summary>
 /// <param name="metricName">Name of the metric.</param>
 public OwinMetricsConfig RegisterRequestTimer(string metricName = "Requests")
 {
     var metricsMiddleware = new RequestTimerMiddleware(metricsRegistry, Name(metricName));
     app.Use(metricsMiddleware);
     return this;
 }