Add MFolderIDsAPICount metric to count FolderIDs in api package (#80866)

* Add MFolderIDsAPICount metric to cound FolderIDs in api package

* Change counter to counter vector with method names as string values
This commit is contained in:
idafurjes
2024-01-24 12:39:11 +01:00
committed by GitHub
parent 5576731332
commit 6b4eaa0d18
7 changed files with 42 additions and 3 deletions
+1
View File
@@ -57,6 +57,7 @@ func (hs *HTTPServer) Search(c *contextmodel.ReqContext) response.Response {
folderID, err := strconv.ParseInt(id, 10, 64)
if err == nil {
folderIDs = append(folderIDs, folderID)
metrics.MFolderIDsAPICount.WithLabelValues(metrics.Search).Inc()
}
}