-
Notifications
You must be signed in to change notification settings - Fork 87
/
metrics.go
26 lines (21 loc) · 946 Bytes
/
metrics.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package events
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var eventsFromStreamCounter = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "indigo_repo_stream_events_received_total",
Help: "Total number of events received from the stream",
}, []string{"remote_addr"})
var bytesFromStreamCounter = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "indigo_repo_stream_bytes_total",
Help: "Total bytes received from the stream",
}, []string{"remote_addr"})
var eventsEnqueued = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "indigo_events_enqueued_for_broadcast_total",
Help: "Total number of events enqueued to broadcast to subscribers",
}, []string{"pool"})
var eventsBroadcast = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "indigo_events_broadcast_total",
Help: "Total number of events broadcast to subscribers",
}, []string{"pool"})