Add leftover metrics for FolderID (#81246)

This commit is contained in:
idafurjes
2024-01-25 12:14:18 +01:00
committed by GitHub
parent 85429f7bd0
commit 0880a239f8
3 changed files with 12 additions and 9 deletions
+5 -2
View File
@@ -235,6 +235,8 @@ const (
GetFolderACL string = "getFolderACL"
Search string = "Search"
GetDashboardACL string = "getDashboardACL"
NewToFolderDTO string = "newToFolderDto"
GetFolders string = "GetFolders"
// FolderID services
Folder string = "folder"
Dashboard string = "dashboards"
@@ -245,13 +247,14 @@ const (
PublicDashboards string = "publicdashboards"
AccessControl string = "accesscontrol"
Guardian string = "guardian"
DashboardImport string = "dashboardimport"
)
func init() {
httpStatusCodes := []string{"200", "404", "500", "unknown"}
objectiveMap := map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}
apiFolderIDMethods := []string{GetAlerts, GetDashboard, RestoreDashboardVersion, GetFolderByID, GetFolderDescendantCounts, SearchFolders, GetFolderPermissionList, UpdateFolderPermissions, GetFolderACL, Search, GetDashboardACL}
serviceFolderIDMethods := []string{Folder, Dashboard, LibraryElements, LibraryPanels, NGAlerts, Provisioning, PublicDashboards, AccessControl, Guardian, Search}
apiFolderIDMethods := []string{GetAlerts, GetDashboard, RestoreDashboardVersion, GetFolderByID, GetFolderDescendantCounts, SearchFolders, GetFolderPermissionList, UpdateFolderPermissions, GetFolderACL, Search, GetDashboardACL, NewToFolderDTO, GetFolders}
serviceFolderIDMethods := []string{Folder, Dashboard, LibraryElements, LibraryPanels, NGAlerts, Provisioning, PublicDashboards, AccessControl, Guardian, Search, DashboardImport}
MInstanceStart = prometheus.NewCounter(prometheus.CounterOpts{
Name: "instance_start_total",