[feature] Add metrics for instance user count, statuses count and federating instances count (#2592)

Co-authored-by: Tsuribori <none@example.org>
This commit is contained in:
Tsuribori 2024-02-14 12:58:55 +02:00 committed by GitHub
commit 142b7ec54f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 74 additions and 11 deletions

View file

@ -24,10 +24,11 @@ import (
"github.com/gin-gonic/gin"
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/uptrace/bun"
)
func Initialize() error {
func Initialize(db db.DB) error {
if config.GetMetricsEnabled() {
return errors.New("metrics was disabled at build time")
}