diff --git a/federationapi/queue/queue.go b/federationapi/queue/queue.go index 1e342b6a9..dcd090856 100644 --- a/federationapi/queue/queue.go +++ b/federationapi/queue/queue.go @@ -49,6 +49,13 @@ type OutgoingQueues struct { queues map[gomatrixserverlib.ServerName]*destinationQueue } +func init() { + prometheus.MustRegister( + destinationQueueTotal, destinationQueueRunning, + destinationQueueBackingOff, + ) +} + var destinationQueueTotal = prometheus.NewGauge( prometheus.GaugeOpts{ Namespace: "dendrite", @@ -73,13 +80,6 @@ var destinationQueueBackingOff = prometheus.NewGauge( }, ) -func init() { - prometheus.MustRegister( - destinationQueueTotal, destinationQueueRunning, - destinationQueueBackingOff, - ) -} - // NewOutgoingQueues makes a new OutgoingQueues func NewOutgoingQueues( db storage.Database,