mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Fix metric
This commit is contained in:
parent
3911f3a0c1
commit
56e934ac0a
1 changed files with 4 additions and 4 deletions
|
@ -67,7 +67,7 @@ func (w *inputWorker) start() {
|
||||||
}
|
}
|
||||||
roomserverInputBackpressure.With(prometheus.Labels{
|
roomserverInputBackpressure.With(prometheus.Labels{
|
||||||
"room_id": task.event.Event.RoomID(),
|
"room_id": task.event.Event.RoomID(),
|
||||||
}).Observe(float64(w.input.count))
|
}).Dec()
|
||||||
hooks.Run(hooks.KindNewEventReceived, task.event.Event)
|
hooks.Run(hooks.KindNewEventReceived, task.event.Event)
|
||||||
_, task.err = w.r.processRoomEvent(task.ctx, task.event)
|
_, task.err = w.r.processRoomEvent(task.ctx, task.event)
|
||||||
if task.err == nil {
|
if task.err == nil {
|
||||||
|
@ -128,8 +128,8 @@ func init() {
|
||||||
prometheus.MustRegister(roomserverInputBackpressure)
|
prometheus.MustRegister(roomserverInputBackpressure)
|
||||||
}
|
}
|
||||||
|
|
||||||
var roomserverInputBackpressure = prometheus.NewSummaryVec(
|
var roomserverInputBackpressure = prometheus.NewGaugeVec(
|
||||||
prometheus.SummaryOpts{
|
prometheus.GaugeOpts{
|
||||||
Namespace: "dendrite",
|
Namespace: "dendrite",
|
||||||
Subsystem: "roomserver",
|
Subsystem: "roomserver",
|
||||||
Name: "input_backpressure",
|
Name: "input_backpressure",
|
||||||
|
@ -184,7 +184,7 @@ func (r *Inputer) InputRoomEvents(
|
||||||
worker.input.push(tasks[i])
|
worker.input.push(tasks[i])
|
||||||
roomserverInputBackpressure.With(prometheus.Labels{
|
roomserverInputBackpressure.With(prometheus.Labels{
|
||||||
"room_id": roomID,
|
"room_id": roomID,
|
||||||
}).Observe(float64(worker.input.count))
|
}).Inc()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wait for all of the workers to return results about our tasks.
|
// Wait for all of the workers to return results about our tasks.
|
||||||
|
|
Loading…
Reference in a new issue