add message bytes metric (#2731)
This commit is contained in:
@@ -35,6 +35,7 @@ var (
|
|||||||
initialized atomic.Bool
|
initialized atomic.Bool
|
||||||
|
|
||||||
MessageCounter *prometheus.CounterVec
|
MessageCounter *prometheus.CounterVec
|
||||||
|
MessageBytes *prometheus.CounterVec
|
||||||
ServiceOperationCounter *prometheus.CounterVec
|
ServiceOperationCounter *prometheus.CounterVec
|
||||||
TwirpRequestStatusCounter *prometheus.CounterVec
|
TwirpRequestStatusCounter *prometheus.CounterVec
|
||||||
|
|
||||||
@@ -61,6 +62,16 @@ func Init(nodeID string, nodeType livekit.NodeType) error {
|
|||||||
[]string{"type", "status"},
|
[]string{"type", "status"},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
MessageBytes = prometheus.NewCounterVec(
|
||||||
|
prometheus.CounterOpts{
|
||||||
|
Namespace: livekitNamespace,
|
||||||
|
Subsystem: "node",
|
||||||
|
Name: "message_bytes",
|
||||||
|
ConstLabels: prometheus.Labels{"node_id": nodeID, "node_type": nodeType.String()},
|
||||||
|
},
|
||||||
|
[]string{"type", "message_type"},
|
||||||
|
)
|
||||||
|
|
||||||
ServiceOperationCounter = prometheus.NewCounterVec(
|
ServiceOperationCounter = prometheus.NewCounterVec(
|
||||||
prometheus.CounterOpts{
|
prometheus.CounterOpts{
|
||||||
Namespace: livekitNamespace,
|
Namespace: livekitNamespace,
|
||||||
@@ -103,6 +114,7 @@ func Init(nodeID string, nodeType livekit.NodeType) error {
|
|||||||
)
|
)
|
||||||
|
|
||||||
prometheus.MustRegister(MessageCounter)
|
prometheus.MustRegister(MessageCounter)
|
||||||
|
prometheus.MustRegister(MessageBytes)
|
||||||
prometheus.MustRegister(ServiceOperationCounter)
|
prometheus.MustRegister(ServiceOperationCounter)
|
||||||
prometheus.MustRegister(TwirpRequestStatusCounter)
|
prometheus.MustRegister(TwirpRequestStatusCounter)
|
||||||
prometheus.MustRegister(promSysPacketGauge)
|
prometheus.MustRegister(promSysPacketGauge)
|
||||||
|
|||||||
Reference in New Issue
Block a user