MCPcopy
hub / github.com/grafana/dskit / Instrument

Struct Instrument

middleware/instrument.go:52–63  ·  middleware/instrument.go::Instrument

Instrument is a Middleware which records timings for every HTTP request

Source from the content-addressed store, hash-verified

50
51// Instrument is a Middleware which records timings for every HTTP request
52type 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.
66func IsWSHandshakeRequest(req *http.Request) bool {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected