MCPcopy Create free account
hub / github.com/cortexproject/cortex / ServeHTTP

Method ServeHTTP

pkg/util/request_tracker/request_wrapper.go:21–30  ·  view source on GitHub ↗
(rw http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

19}
20
21func (w *RequestWrapper) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
22 if w.requestTracker != nil {
23 insertIndex, err := w.requestTracker.Insert(r.Context(), w.extractor.Extract(r))
24 if err == nil {
25 defer w.requestTracker.Delete(insertIndex)
26 }
27 }
28
29 w.handler.ServeHTTP(rw, r)
30}

Calls 4

InsertMethod · 0.80
ExtractMethod · 0.65
DeleteMethod · 0.65
ContextMethod · 0.45