Add MFolderIDsServiceCount to count folderIDs in services pkg (#81237)

This commit is contained in:
idafurjes
2024-01-25 11:10:35 +01:00
committed by GitHub
parent 0d66ad68f8
commit 7e5544ab21
25 changed files with 129 additions and 3 deletions
+2
View File
@@ -4,6 +4,7 @@ import (
"context"
"slices"
"github.com/grafana/grafana/pkg/infra/metrics"
"github.com/grafana/grafana/pkg/services/auth/identity"
"github.com/grafana/grafana/pkg/services/dashboards"
"github.com/grafana/grafana/pkg/services/folder"
@@ -117,6 +118,7 @@ func MockDashboardGuardian(mock *FakeDashboardGuardian) {
NewByFolder = func(_ context.Context, f *folder.Folder, orgId int64, user identity.Requester) (DashboardGuardian, error) {
mock.OrgID = orgId
mock.DashUID = f.UID
metrics.MFolderIDsServiceCount.WithLabelValues(metrics.Guardian).Inc()
// nolint:staticcheck
mock.DashID = f.ID
mock.User = user