1
0

feat(metrics): add total number of attachments metric

This commit is contained in:
kolaente
2023-12-03 15:30:39 +01:00
parent fd0b2d103d
commit cca42b9188
3 changed files with 49 additions and 11 deletions

View File

@ -28,11 +28,12 @@ import (
)
const (
ProjectCountKey = `project_count`
UserCountKey = `user_count`
TaskCountKey = `task_count`
TeamCountKey = `team_count`
FilesCountKey = `files_count`
ProjectCountKey = `project_count`
UserCountKey = `user_count`
TaskCountKey = `task_count`
TeamCountKey = `team_count`
FilesCountKey = `files_count`
AttachmentsCountKey = `attachments_count`
)
var registry *prometheus.Registry
@ -69,6 +70,7 @@ func InitMetrics() {
registerPromMetric(TaskCountKey, "The total number of tasks on this instance")
registerPromMetric(TeamCountKey, "The total number of teams on this instance")
registerPromMetric(FilesCountKey, "The total number of files on this instance")
registerPromMetric(AttachmentsCountKey, "The total number of attachments on this instance")
setupActiveUsersMetric()
setupActiveLinkSharesMetric()