From fb2b9f33d238b4029cb9c1a5f8465b46c895d08a Mon Sep 17 00:00:00 2001 From: idafurjes <36131195+idafurjes@users.noreply.github.com> Date: Thu, 25 Jan 2024 17:26:24 +0100 Subject: [PATCH] Fix method to service in metric label for FolderID (#81283) --- pkg/infra/metrics/metrics.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/infra/metrics/metrics.go b/pkg/infra/metrics/metrics.go index 51a7f3b2a75..f98512f8b99 100644 --- a/pkg/infra/metrics/metrics.go +++ b/pkg/infra/metrics/metrics.go @@ -254,7 +254,7 @@ 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, NewToFolderDTO, GetFolders} - serviceFolderIDMethods := []string{Folder, Dashboard, LibraryElements, LibraryPanels, NGAlerts, Provisioning, PublicDashboards, AccessControl, Guardian, Search, DashboardImport} + folderIDServices := []string{Folder, Dashboard, LibraryElements, LibraryPanels, NGAlerts, Provisioning, PublicDashboards, AccessControl, Guardian, Search, DashboardImport} MInstanceStart = prometheus.NewCounter(prometheus.CounterOpts{ Name: "instance_start_total", @@ -502,7 +502,7 @@ func init() { Name: "folder_id_service_count", Help: "counter for folder id usage in service package", Namespace: ExporterName, - }, []string{"method"}, map[string][]string{"method": serviceFolderIDMethods}) + }, []string{"service"}, map[string][]string{"service": folderIDServices}) MStatTotalDashboards = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "stat_totals_dashboard",