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:
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/grafana/grafana/pkg/api/dtos"
|
||||
"github.com/grafana/grafana/pkg/api/response"
|
||||
"github.com/grafana/grafana/pkg/infra/metrics"
|
||||
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
||||
"github.com/grafana/grafana/pkg/services/auth/identity"
|
||||
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
|
||||
@@ -193,6 +194,7 @@ func (hs *HTTPServer) getDashboardACL(ctx context.Context, user identity.Request
|
||||
|
||||
permission := dashboardPermissionMap[hs.dashboardPermissionsService.MapActions(p)]
|
||||
|
||||
metrics.MFolderIDsAPICount.WithLabelValues(metrics.GetDashboardACL).Inc()
|
||||
acl = append(acl, &dashboards.DashboardACLInfoDTO{
|
||||
OrgID: dashboard.OrgID,
|
||||
DashboardID: dashboard.ID,
|
||||
|
||||
Reference in New Issue
Block a user