mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-09 22:42:58 +00:00
Fix metrics..
This commit is contained in:
parent
4c3a526e1b
commit
5a87c703fa
@ -126,6 +126,7 @@ func (r *RoomserverInternalAPI) SetFederationAPI(fsAPI fsAPI.RoomserverFederatio
|
|||||||
KeyRing: keyRing,
|
KeyRing: keyRing,
|
||||||
ACLs: r.ServerACLs,
|
ACLs: r.ServerACLs,
|
||||||
Queryer: r.Queryer,
|
Queryer: r.Queryer,
|
||||||
|
EnableMetrics: r.enableMetrics,
|
||||||
}
|
}
|
||||||
r.Inviter = &perform.Inviter{
|
r.Inviter = &perform.Inviter{
|
||||||
DB: r.DB,
|
DB: r.DB,
|
||||||
|
@ -91,7 +91,7 @@ type Inputer struct {
|
|||||||
|
|
||||||
Queryer *query.Queryer
|
Queryer *query.Queryer
|
||||||
UserAPI userapi.RoomserverUserAPI
|
UserAPI userapi.RoomserverUserAPI
|
||||||
enableMetrics bool
|
EnableMetrics bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// If a room consumer is inactive for a while then we will allow NATS
|
// 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
|
// 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.
|
// own consumer. If we don't, we'll start one.
|
||||||
func (r *Inputer) Start() error {
|
func (r *Inputer) Start() error {
|
||||||
if r.enableMetrics {
|
if r.EnableMetrics {
|
||||||
prometheus.MustRegister(roomserverInputBackpressure, processRoomEventDuration)
|
prometheus.MustRegister(roomserverInputBackpressure, processRoomEventDuration)
|
||||||
}
|
}
|
||||||
_, err := r.JetStream.Subscribe(
|
_, err := r.JetStream.Subscribe(
|
||||||
|
Loading…
Reference in New Issue
Block a user