Instrument is a Middleware which records timings for every HTTP request
| 50 | |
| 51 | // Instrument is a Middleware which records timings for every HTTP request |
| 52 | type Instrument struct { |
| 53 | Duration *prometheus.HistogramVec |
| 54 | PerTenantDuration *prometheus.HistogramVec |
| 55 | PerTenantTotal *prometheus.CounterVec |
| 56 | PerTenantCallback PerTenantCallback |
| 57 | RequestBodySize *prometheus.HistogramVec |
| 58 | ResponseBodySize *prometheus.HistogramVec |
| 59 | InflightRequests *prometheus.GaugeVec |
| 60 | LatencyCutoff time.Duration |
| 61 | ThroughputUnit string |
| 62 | RequestThroughput *prometheus.HistogramVec |
| 63 | } |
| 64 | |
| 65 | // IsWSHandshakeRequest returns true if the given request is a websocket handshake request. |
| 66 | func IsWSHandshakeRequest(req *http.Request) bool { |
nothing calls this directly
no outgoing calls
no test coverage detected