diff options
| author | 2024-02-14 12:58:55 +0200 | |
|---|---|---|
| committer | 2024-02-14 11:58:55 +0100 | |
| commit | 142b7ec54fc415e166854fccc184c4cbc2fc12b3 (patch) | |
| tree | 542ebc8c336e40edf71da7307ebe947aa733475d /cmd/gotosocial/action/server | |
| parent | [docs] Inform new contributors to `git fetch` (#2637) (diff) | |
| download | gotosocial-142b7ec54fc415e166854fccc184c4cbc2fc12b3.tar.xz | |
[feature] Add metrics for instance user count, statuses count and federating instances count (#2592)
Co-authored-by: Tsuribori <none@example.org>
Diffstat (limited to 'cmd/gotosocial/action/server')
| -rw-r--r-- | cmd/gotosocial/action/server/server.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/gotosocial/action/server/server.go b/cmd/gotosocial/action/server/server.go index de9b3b3f1..d72df1d41 100644 --- a/cmd/gotosocial/action/server/server.go +++ b/cmd/gotosocial/action/server/server.go @@ -82,11 +82,6 @@ var Start action.GTSAction = func(ctx context.Context) error { return fmt.Errorf("error initializing tracing: %w", err) } - // Initialize Metrics - if err := metrics.Initialize(); err != nil { - return fmt.Errorf("error initializing metrics: %w", err) - } - // Open connection to the database dbService, err := bundb.NewBunDBService(ctx, &state) if err != nil { @@ -218,6 +213,11 @@ var Start action.GTSAction = func(ctx context.Context) error { return fmt.Errorf("error scheduling poll expiries: %w", err) } + // Initialize metrics. + if err := metrics.Initialize(state.DB); err != nil { + return fmt.Errorf("error initializing metrics: %w", err) + } + /* HTTP router initialization */ |
