Folders: Add metric for listing subfolders duration (#81144)

This commit is contained in:
Alexander Zobnin
2024-01-24 14:15:32 +01:00
committed by GitHub
parent 57ba8dc75d
commit 7872a128a2
2 changed files with 20 additions and 1 deletions
+11
View File
@@ -12,6 +12,7 @@ const (
type foldersMetrics struct {
sharedWithMeFetchFoldersRequestsDuration *prometheus.HistogramVec
foldersGetChildrenRequestsDuration *prometheus.HistogramVec
}
func newFoldersMetrics(r prometheus.Registerer) *foldersMetrics {
@@ -26,5 +27,15 @@ func newFoldersMetrics(r prometheus.Registerer) *foldersMetrics {
},
[]string{"status"},
),
foldersGetChildrenRequestsDuration: promauto.With(r).NewHistogramVec(
prometheus.HistogramOpts{
Name: "get_children_duration_seconds",
Help: "Duration of listing subfolders in specific folder",
Buckets: []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 25, 50, 100},
Namespace: metricsNamespace,
Subsystem: metricsSubSystem,
},
[]string{"parent"},
),
}
}