Skip to content

Commit 9b80972

Browse files
MB-60425: _prometheusMetrics is meant to only advertise process-level stats
This will keep the list of stats advertised by _prometheusMetrics and _prometheusMetricsHigh non-overlapping. Change-Id: Iff10e519b684aff98a1fdc949b356e1b2b4f9749 Reviewed-on: https://review.couchbase.org/c/cbft/+/203870 Well-Formed: Build Bot <[email protected]> Reviewed-by: <[email protected]> Tested-by: Abhi Dangeti <[email protected]>
1 parent 1ac3330 commit 9b80972

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

prometheus.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,7 @@ func (h *PrometheusMetricsHandler) ServeHTTP(w http.ResponseWriter,
247247
w.Header().Set("Cache-Control", "no-cache")
248248
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
249249

250-
stats, err := gatherIndexesStats(h.mgr, rd, false)
251-
if err != nil {
252-
rest.ShowError(w, req, fmt.Sprintf("error in retrieving defs: %v", err),
253-
http.StatusInternalServerError)
254-
return
255-
}
256-
257-
topLevelStats := stats[""]
250+
topLevelStats := gatherTopLevelStats(h.mgr, rd)
258251

259252
for k, v := range topLevelStats {
260253
b, err := json.Marshal(v)

0 commit comments

Comments
 (0)