Skip to content

Commit

Permalink
Fix metric
Browse files Browse the repository at this point in the history
  • Loading branch information
neilalexander committed Jul 2, 2021
1 parent 3911f3a commit 56e934a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions roomserver/internal/input/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (w *inputWorker) start() {
}
roomserverInputBackpressure.With(prometheus.Labels{
"room_id": task.event.Event.RoomID(),
}).Observe(float64(w.input.count))
}).Dec()
hooks.Run(hooks.KindNewEventReceived, task.event.Event)
_, task.err = w.r.processRoomEvent(task.ctx, task.event)
if task.err == nil {
Expand Down Expand Up @@ -128,8 +128,8 @@ func init() {
prometheus.MustRegister(roomserverInputBackpressure)
}

var roomserverInputBackpressure = prometheus.NewSummaryVec(
prometheus.SummaryOpts{
var roomserverInputBackpressure = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: "dendrite",
Subsystem: "roomserver",
Name: "input_backpressure",
Expand Down Expand Up @@ -184,7 +184,7 @@ func (r *Inputer) InputRoomEvents(
worker.input.push(tasks[i])
roomserverInputBackpressure.With(prometheus.Labels{
"room_id": roomID,
}).Observe(float64(worker.input.count))
}).Inc()
}

// Wait for all of the workers to return results about our tasks.
Expand Down

0 comments on commit 56e934a

Please sign in to comment.