@@ -16,6 +16,7 @@ If you are using a framework that isn't directly compatible with go's `http.Hand
1616 - [ Recorder] ( #recorder )
1717 - [ GroupedStatus] ( #groupedstatus )
1818 - [ DisableMeasureSize] ( #disablemeasuresize )
19+ - [ DisableMeasureInflight] ( #disablemeasureinflight )
1920 - [ Custom handler ID] ( #custom-handler-id )
2021 - [ Prometheus recorder options] ( #prometheus-recorder-options )
2122 - [ Prefix] ( #prefix )
@@ -31,6 +32,7 @@ The metrics obtained with this middleware are the [most important ones][red] for
3132- Records the duration of the requests(with: code, handler, method).
3233- Records the count of the requests(with: code, handler, method).
3334- Records the size of the responses(with: code, handler, method).
35+ - Records the number requests being handled concurrently at a given time a.k.a inflight requests (with: handler).
3436
3537## Metrics recorder implementations
3638
@@ -141,6 +143,10 @@ Storing all the status codes could increase the cardinality of the metrics, usua
141143
142144This setting will disable measuring the size of the responses. By default measuring the size is enabled.
143145
146+ #### DisableMeasureInflight
147+
148+ This settings will disable measuring the number of requests being handled concurrently by the handlers.
149+
144150#### Custom handler ID
145151
146152One of the options that you need to pass when wrapping the handler with the middleware is ` handlerID ` , this has 2 working ways.
@@ -174,10 +180,11 @@ The label names of the Prometheus metrics can be configured using `HandlerIDLabe
174180``` text
175181pkg: github.com/slok/go-http-metrics/middleware
176182
177- BenchmarkMiddlewareHandler/benchmark_with_default_settings.-4 1000000 1062 ns/op 256 B/op 6 allocs/op
178- BenchmarkMiddlewareHandler/benchmark_disabling_measuring_size.-4 1000000 1101 ns/op 256 B/op 6 allocs/op
179- BenchmarkMiddlewareHandler/benchmark_with_grouped_status_code.-4 1000000 1324 ns/op 256 B/op 7 allocs/op
180- BenchmarkMiddlewareHandler/benchmark_with_predefined_handler_ID-4 1000000 1155 ns/op 256 B/op 6 allocs/op
183+ BenchmarkMiddlewareHandler/benchmark_with_default_settings.-4 1000000 1206 ns/op 256 B/op 6 allocs/op
184+ BenchmarkMiddlewareHandler/benchmark_disabling_measuring_size.-4 1000000 1198 ns/op 256 B/op 6 allocs/op
185+ BenchmarkMiddlewareHandler/benchmark_disabling_inflights.-4 1000000 1139 ns/op 256 B/op 6 allocs/op
186+ BenchmarkMiddlewareHandler/benchmark_with_grouped_status_code.-4 1000000 1534 ns/op 256 B/op 7 allocs/op
187+ BenchmarkMiddlewareHandler/benchmark_with_predefined_handler_ID-4 1000000 1258 ns/op 256 B/op 6 allocs/op
181188```
182189
183190[ travis-image ] : https://travis-ci.org/slok/go-http-metrics.svg?branch=master
0 commit comments