aboutsummaryrefslogtreecommitdiff
path: root/roomserver
diff options
context:
space:
mode:
authorTill Faelligen <2353100+S7evinK@users.noreply.github.com>2023-07-05 12:34:53 +0200
committerTill Faelligen <2353100+S7evinK@users.noreply.github.com>2023-07-05 12:34:53 +0200
commit5a87c703fadc5037821a80f405fb5b3049c5dc82 (patch)
treeca3e64db31a663a782990f076290f13270ecd4fb /roomserver
parent4c3a526e1b82b87be2e2640987736ba0ac8e1f4e (diff)
Fix metrics..
Diffstat (limited to 'roomserver')
-rw-r--r--roomserver/internal/api.go1
-rw-r--r--roomserver/internal/input/input.go4
2 files changed, 3 insertions, 2 deletions
diff --git a/roomserver/internal/api.go b/roomserver/internal/api.go
index 2e12671f..984dc7d9 100644
--- a/roomserver/internal/api.go
+++ b/roomserver/internal/api.go
@@ -126,6 +126,7 @@ func (r *RoomserverInternalAPI) SetFederationAPI(fsAPI fsAPI.RoomserverFederatio
KeyRing: keyRing,
ACLs: r.ServerACLs,
Queryer: r.Queryer,
+ EnableMetrics: r.enableMetrics,
}
r.Inviter = &perform.Inviter{
DB: r.DB,
diff --git a/roomserver/internal/input/input.go b/roomserver/internal/input/input.go
index dea8f8c8..a8afbc31 100644
--- a/roomserver/internal/input/input.go
+++ b/roomserver/internal/input/input.go
@@ -91,7 +91,7 @@ type Inputer struct {
Queryer *query.Queryer
UserAPI userapi.RoomserverUserAPI
- enableMetrics bool
+ EnableMetrics bool
}
// If a room consumer is inactive for a while then we will allow NATS
@@ -178,7 +178,7 @@ func (r *Inputer) startWorkerForRoom(roomID string) {
// will look to see if we have a worker for that room which has its
// own consumer. If we don't, we'll start one.
func (r *Inputer) Start() error {
- if r.enableMetrics {
+ if r.EnableMetrics {
prometheus.MustRegister(roomserverInputBackpressure, processRoomEventDuration)
}
_, err := r.JetStream.Subscribe(