From a51abe93b62f7e0cc601eb88284046f6355f7a05 Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Thu, 19 Dec 2024 10:36:34 +0900 Subject: [PATCH 1/3] Add total_sent_srtp_sfu_delay_us handling --- collector/sora_api.go | 1 + collector/srtp.go | 4 ++++ main_test.go | 2 ++ test/maximum.metrics | 3 +++ test/minimum.metrics | 3 +++ test/sora_client_enabled.metrics | 3 +++ test/sora_cluster_metrics_enabled.metrics | 3 +++ test/sora_connection_error_enabled.metrics | 3 +++ test/sora_erlang_vm_enabled.metrics | 3 +++ 9 files changed, 25 insertions(+) diff --git a/collector/sora_api.go b/collector/sora_api.go index 67031d4..aa92016 100644 --- a/collector/sora_api.go +++ b/collector/sora_api.go @@ -51,6 +51,7 @@ type soraSrtpReport struct { TotalReceivedSrtpByteSize int64 `json:"total_received_srtp_byte_size"` TotalSentSrtp int64 `json:"total_sent_srtp"` TotalSentSrtpByteSize int64 `json:"total_sent_srtp_byte_size"` + TotalSentSrtpSfuDelayUs int64 `json:"total_sent_srtp_sfu_delay_us"` TotalDecryptedSrtp int64 `json:"total_decrypted_srtp"` TotalDecryptedSrtpByteSize int64 `json:"total_decrypted_srtp_byte_size"` } diff --git a/collector/srtp.go b/collector/srtp.go index dc500c6..4fc13ee 100644 --- a/collector/srtp.go +++ b/collector/srtp.go @@ -8,6 +8,7 @@ var ( totalReceivedSrtpByteSize: newDesc("srtp_received_bytes_total", "The total number of received SRTP bytes."), totalSentSrtp: newDesc("srtp_sent_packets_total", "The total number of sent SRTP packets."), totalSentSrtpByteSize: newDesc("srtp_sent_bytes_total", "The total number of sent SRTP bytes."), + totalSentSrtpSfuDelayUs: newDesc("srtp_sent_sfu_delay_us_total", "The total delay introduced by the SFU during the transfer of SRTP packets."), totalDecryptedSrtp: newDesc("srtp_decrypted_packets_total", "The total number of decrpyted SRTP packets."), totalDecryptedSrtpByteSize: newDesc("srtp_decrpyted_bytes_total", "The total number of decrypted SRTP bytes."), } @@ -18,6 +19,7 @@ type SrtpMetrics struct { totalReceivedSrtpByteSize *prometheus.Desc totalSentSrtp *prometheus.Desc totalSentSrtpByteSize *prometheus.Desc + totalSentSrtpSfuDelayUs *prometheus.Desc totalDecryptedSrtp *prometheus.Desc totalDecryptedSrtpByteSize *prometheus.Desc } @@ -27,6 +29,7 @@ func (m *SrtpMetrics) Describe(ch chan<- *prometheus.Desc) { ch <- m.totalReceivedSrtpByteSize ch <- m.totalSentSrtp ch <- m.totalSentSrtpByteSize + ch <- m.totalSentSrtpSfuDelayUs ch <- m.totalDecryptedSrtp ch <- m.totalDecryptedSrtpByteSize } @@ -36,6 +39,7 @@ func (m *SrtpMetrics) Collect(ch chan<- prometheus.Metric, report soraSrtpReport ch <- newCounter(m.totalReceivedSrtpByteSize, float64(report.TotalReceivedSrtpByteSize)) ch <- newCounter(m.totalSentSrtp, float64(report.TotalSentSrtp)) ch <- newCounter(m.totalSentSrtpByteSize, float64(report.TotalSentSrtpByteSize)) + ch <- newCounter(m.totalSentSrtpSfuDelayUs, float64(report.TotalSentSrtpSfuDelayUs)) ch <- newCounter(m.totalDecryptedSrtp, float64(report.TotalDecryptedSrtp)) ch <- newCounter(m.totalDecryptedSrtpByteSize, float64(report.TotalDecryptedSrtpByteSize)) } diff --git a/main_test.go b/main_test.go index 34dcb9c..3ec7c00 100644 --- a/main_test.go +++ b/main_test.go @@ -166,6 +166,7 @@ var ( "total_sent_sctp_byte_size": 111, "total_sent_srtp": 106, "total_sent_srtp_byte_size": 107, + "total_sent_srtp_sfu_delay_us": 123456, "total_session_created": 1, "total_session_destroyed": 0, "total_successful_auth_webhook": 96, @@ -435,6 +436,7 @@ func TestMinimumMetrics(t *testing.T) { "total_sent_sctp_byte_size": 111, "total_sent_srtp": 106, "total_sent_srtp_byte_size": 107, + "total_sent_srtp_sfu_delay_us": 123456, "total_session_created": 111, "total_session_destroyed": 222, "total_successful_auth_webhook": 96, diff --git a/test/maximum.metrics b/test/maximum.metrics index 9dc08c0..8f93f55 100644 --- a/test/maximum.metrics +++ b/test/maximum.metrics @@ -220,6 +220,9 @@ sora_srtp_received_packets_total 108 # HELP sora_srtp_sent_bytes_total The total number of sent SRTP bytes. # TYPE sora_srtp_sent_bytes_total counter sora_srtp_sent_bytes_total 107 +# HELP sora_srtp_sent_sfu_delay_us_total The total delay introduced by the SFU during the transfer of SRTP packets. +# TYPE sora_srtp_sent_sfu_delay_us_total counter +sora_srtp_sent_sfu_delay_us_total 123456 # HELP sora_srtp_sent_packets_total The total number of sent SRTP packets. # TYPE sora_srtp_sent_packets_total counter sora_srtp_sent_packets_total 106 diff --git a/test/minimum.metrics b/test/minimum.metrics index 47ed127..73dd11c 100644 --- a/test/minimum.metrics +++ b/test/minimum.metrics @@ -74,6 +74,9 @@ sora_srtp_received_packets_total 108 # HELP sora_srtp_sent_bytes_total The total number of sent SRTP bytes. # TYPE sora_srtp_sent_bytes_total counter sora_srtp_sent_bytes_total 107 +# HELP sora_srtp_sent_sfu_delay_us_total The total delay introduced by the SFU during the transfer of SRTP packets. +# TYPE sora_srtp_sent_sfu_delay_us_total counter +sora_srtp_sent_sfu_delay_us_total 123456 # HELP sora_srtp_sent_packets_total The total number of sent SRTP packets. # TYPE sora_srtp_sent_packets_total counter sora_srtp_sent_packets_total 106 diff --git a/test/sora_client_enabled.metrics b/test/sora_client_enabled.metrics index ccb12bb..02599e9 100644 --- a/test/sora_client_enabled.metrics +++ b/test/sora_client_enabled.metrics @@ -105,6 +105,9 @@ sora_srtp_received_packets_total 108 # HELP sora_srtp_sent_bytes_total The total number of sent SRTP bytes. # TYPE sora_srtp_sent_bytes_total counter sora_srtp_sent_bytes_total 107 +# HELP sora_srtp_sent_sfu_delay_us_total The total delay introduced by the SFU during the transfer of SRTP packets. +# TYPE sora_srtp_sent_sfu_delay_us_total counter +sora_srtp_sent_sfu_delay_us_total 123456 # HELP sora_srtp_sent_packets_total The total number of sent SRTP packets. # TYPE sora_srtp_sent_packets_total counter sora_srtp_sent_packets_total 106 diff --git a/test/sora_cluster_metrics_enabled.metrics b/test/sora_cluster_metrics_enabled.metrics index fa234ba..88999b1 100644 --- a/test/sora_cluster_metrics_enabled.metrics +++ b/test/sora_cluster_metrics_enabled.metrics @@ -107,6 +107,9 @@ sora_srtp_received_packets_total 108 # HELP sora_srtp_sent_bytes_total The total number of sent SRTP bytes. # TYPE sora_srtp_sent_bytes_total counter sora_srtp_sent_bytes_total 107 +# HELP sora_srtp_sent_sfu_delay_us_total The total delay introduced by the SFU during the transfer of SRTP packets. +# TYPE sora_srtp_sent_sfu_delay_us_total counter +sora_srtp_sent_sfu_delay_us_total 123456 # HELP sora_srtp_sent_packets_total The total number of sent SRTP packets. # TYPE sora_srtp_sent_packets_total counter sora_srtp_sent_packets_total 106 diff --git a/test/sora_connection_error_enabled.metrics b/test/sora_connection_error_enabled.metrics index a9a7eef..9c325d9 100644 --- a/test/sora_connection_error_enabled.metrics +++ b/test/sora_connection_error_enabled.metrics @@ -81,6 +81,9 @@ sora_srtp_received_packets_total 108 # HELP sora_srtp_sent_bytes_total The total number of sent SRTP bytes. # TYPE sora_srtp_sent_bytes_total counter sora_srtp_sent_bytes_total 107 +# HELP sora_srtp_sent_sfu_delay_us_total The total delay introduced by the SFU during the transfer of SRTP packets. +# TYPE sora_srtp_sent_sfu_delay_us_total counter +sora_srtp_sent_sfu_delay_us_total 123456 # HELP sora_srtp_sent_packets_total The total number of sent SRTP packets. # TYPE sora_srtp_sent_packets_total counter sora_srtp_sent_packets_total 106 diff --git a/test/sora_erlang_vm_enabled.metrics b/test/sora_erlang_vm_enabled.metrics index d5e3a1b..b1726d8 100644 --- a/test/sora_erlang_vm_enabled.metrics +++ b/test/sora_erlang_vm_enabled.metrics @@ -158,6 +158,9 @@ sora_srtp_received_packets_total 108 # HELP sora_srtp_sent_bytes_total The total number of sent SRTP bytes. # TYPE sora_srtp_sent_bytes_total counter sora_srtp_sent_bytes_total 107 +# HELP sora_srtp_sent_sfu_delay_us_total The total delay introduced by the SFU during the transfer of SRTP packets. +# TYPE sora_srtp_sent_sfu_delay_us_total counter +sora_srtp_sent_sfu_delay_us_total 123456 # HELP sora_srtp_sent_packets_total The total number of sent SRTP packets. # TYPE sora_srtp_sent_packets_total counter sora_srtp_sent_packets_total 106 From 1426e7173d28eb381ce4d8063b70049a851aee51 Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Thu, 19 Dec 2024 11:29:27 +0900 Subject: [PATCH 2/3] =?UTF-8?q?plumtree=20=E9=96=A2=E9=80=A3=E3=81=AE?= =?UTF-8?q?=E3=83=A1=E3=83=88=E3=83=AA=E3=82=AF=E3=82=B9=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- collector/cluster_node.go | 47 +++++++++++++++++++++++ collector/sora_api.go | 25 +++++++++--- main_test.go | 30 ++++++++++++++- test/maximum.metrics | 44 +++++++++++++++++++++ test/sora_cluster_metrics_enabled.metrics | 44 +++++++++++++++++++++ 5 files changed, 183 insertions(+), 7 deletions(-) diff --git a/collector/cluster_node.go b/collector/cluster_node.go index 3d28529..b82c31c 100644 --- a/collector/cluster_node.go +++ b/collector/cluster_node.go @@ -15,6 +15,18 @@ var ( clusterRelaySentBytesTotal: newDescWithLabel("cluster_relay_sent_bytes_total", "The total number of bytes sent by the cluster relay.", []string{"node_name"}), clusterRelayReceivedPacketsTotal: newDescWithLabel("cluster_relay_received_packets_total", "The total number of packets received by the cluster relay.", []string{"node_name"}), clusterRelaySentPacketsTotal: newDescWithLabel("cluster_relay_sent_packets_total", "The total number of packets sent by the cluster relay.", []string{"node_name"}), + + clusterRelayPlumtreeSentGossipTotal: newDescWithLabel("cluster_relay_plumtree_sent_gossip_total", "The total number of Plumtree GOSSIP messages sent by the cluster relay.", []string{"node_name"}), + clusterRelayPlumtreeReceivedGossipTotal: newDescWithLabel("cluster_relay_plumtree_received_gossip_total", "The total number of Plumtree GOSSIP messages received by the cluster relay.", []string{"node_name"}), + clusterRelayPlumtreeSentIhaveTotal: newDescWithLabel("cluster_relay_plumtree_sent_ihave_total", "The total number of Plumtree IHAVE messages sent by the cluster relay.", []string{"node_name"}), + clusterRelayPlumtreeReceivedIhaveTotal: newDescWithLabel("cluster_relay_plumtree_received_ihave_total", "The total number of Plumtree IHAVE messages received by the cluster relay.", []string{"node_name"}), + clusterRelayPlumtreeSentGraftTotal: newDescWithLabel("cluster_relay_plumtree_sent_graft_total", "The total number of Plumtree GRAFT messages sent by the cluster relay.", []string{"node_name"}), + clusterRelayPlumtreeReceivedGraftTotal: newDescWithLabel("cluster_relay_plumtree_received_graft_total", "The total number of Plumtree GRAFT messages received by the cluster relay.", []string{"node_name"}), + clusterRelayPlumtreeSentPruneTotal: newDescWithLabel("cluster_relay_plumtree_sent_prune_total", "The total number of Plumtree PRUNE messages sent by the cluster relay.", []string{"node_name"}), + clusterRelayPlumtreeReceivedPruneTotal: newDescWithLabel("cluster_relay_plumtree_received_prune_total", "The total number of Plumtree PRUNE messages received by the cluster relay.", []string{"node_name"}), + clusterRelayPlumtreeGraftMissTotal: newDescWithLabel("cluster_relay_plumtree_graft_miss_total", "The total number of Plumtree GRAFT messages missed by the cluster relay.", []string{"node_name"}), + clusterRelayPlumtreeSkippedSendTotal: newDescWithLabel("cluster_relay_plumtree_skipped_send_total", "The total number of Plumtree messages whose sending was skipped by the cluster relay.", []string{"node_name"}), + clusterRelayPlumtreeIgnoredTotal: newDescWithLabel("cluster_relay_plumtree_ignored_total", "The total number of Plumtree messages received but ignored by the cluster relay.", []string{"node_name"}), } ) @@ -28,6 +40,18 @@ type SoraClusterMetrics struct { clusterRelaySentBytesTotal *prometheus.Desc clusterRelayReceivedPacketsTotal *prometheus.Desc clusterRelaySentPacketsTotal *prometheus.Desc + + clusterRelayPlumtreeSentGossipTotal *prometheus.Desc + clusterRelayPlumtreeReceivedGossipTotal *prometheus.Desc + clusterRelayPlumtreeSentIhaveTotal *prometheus.Desc + clusterRelayPlumtreeReceivedIhaveTotal *prometheus.Desc + clusterRelayPlumtreeSentGraftTotal *prometheus.Desc + clusterRelayPlumtreeReceivedGraftTotal *prometheus.Desc + clusterRelayPlumtreeSentPruneTotal *prometheus.Desc + clusterRelayPlumtreeReceivedPruneTotal *prometheus.Desc + clusterRelayPlumtreeGraftMissTotal *prometheus.Desc + clusterRelayPlumtreeSkippedSendTotal *prometheus.Desc + clusterRelayPlumtreeIgnoredTotal *prometheus.Desc } func (m *SoraClusterMetrics) Describe(ch chan<- *prometheus.Desc) { @@ -39,6 +63,17 @@ func (m *SoraClusterMetrics) Describe(ch chan<- *prometheus.Desc) { ch <- m.clusterRelaySentBytesTotal ch <- m.clusterRelayReceivedPacketsTotal ch <- m.clusterRelaySentPacketsTotal + ch <- m.clusterRelayPlumtreeSentGossipTotal + ch <- m.clusterRelayPlumtreeReceivedGossipTotal + ch <- m.clusterRelayPlumtreeSentIhaveTotal + ch <- m.clusterRelayPlumtreeReceivedIhaveTotal + ch <- m.clusterRelayPlumtreeSentGraftTotal + ch <- m.clusterRelayPlumtreeReceivedGraftTotal + ch <- m.clusterRelayPlumtreeSentPruneTotal + ch <- m.clusterRelayPlumtreeReceivedPruneTotal + ch <- m.clusterRelayPlumtreeGraftMissTotal + ch <- m.clusterRelayPlumtreeSkippedSendTotal + ch <- m.clusterRelayPlumtreeIgnoredTotal } func (m *SoraClusterMetrics) Collect(ch chan<- prometheus.Metric, nodeList []soraClusterNode, report soraClusterReport, clusterRelaies []soraClusterRelay) { @@ -68,5 +103,17 @@ func (m *SoraClusterMetrics) Collect(ch chan<- prometheus.Metric, nodeList []sor ch <- newCounter(m.clusterRelaySentBytesTotal, float64(relayNode.TotalSentByteSize), relayNode.NodeName) ch <- newCounter(m.clusterRelayReceivedPacketsTotal, float64(relayNode.TotalReceived), relayNode.NodeName) ch <- newCounter(m.clusterRelaySentPacketsTotal, float64(relayNode.TotalSent), relayNode.NodeName) + + ch <- newCounter(m.clusterRelayPlumtreeSentGossipTotal, float64(relayNode.Plumtree.TotalSentGossip), relayNode.NodeName) + ch <- newCounter(m.clusterRelayPlumtreeReceivedGossipTotal, float64(relayNode.Plumtree.TotalReceivedGossip), relayNode.NodeName) + ch <- newCounter(m.clusterRelayPlumtreeSentIhaveTotal, float64(relayNode.Plumtree.TotalSentIhave), relayNode.NodeName) + ch <- newCounter(m.clusterRelayPlumtreeReceivedIhaveTotal, float64(relayNode.Plumtree.TotalReceivedIhave), relayNode.NodeName) + ch <- newCounter(m.clusterRelayPlumtreeSentGraftTotal, float64(relayNode.Plumtree.TotalSentGraft), relayNode.NodeName) + ch <- newCounter(m.clusterRelayPlumtreeReceivedGraftTotal, float64(relayNode.Plumtree.TotalReceivedGraft), relayNode.NodeName) + ch <- newCounter(m.clusterRelayPlumtreeSentPruneTotal, float64(relayNode.Plumtree.TotalSentPrune), relayNode.NodeName) + ch <- newCounter(m.clusterRelayPlumtreeReceivedPruneTotal, float64(relayNode.Plumtree.TotalReceivedPrune), relayNode.NodeName) + ch <- newCounter(m.clusterRelayPlumtreeGraftMissTotal, float64(relayNode.Plumtree.TotalGraftMiss), relayNode.NodeName) + ch <- newCounter(m.clusterRelayPlumtreeSkippedSendTotal, float64(relayNode.Plumtree.TotalSkippedSend), relayNode.NodeName) + ch <- newCounter(m.clusterRelayPlumtreeIgnoredTotal, float64(relayNode.Plumtree.TotalIgnored), relayNode.NodeName) } } diff --git a/collector/sora_api.go b/collector/sora_api.go index aa92016..a07f5a4 100644 --- a/collector/sora_api.go +++ b/collector/sora_api.go @@ -170,11 +170,26 @@ type soraClusterNode struct { } type soraClusterRelay struct { - NodeName string `json:"node_name"` - TotalReceivedByteSize int64 `json:"total_received_byte_size"` - TotalSentByteSize int64 `json:"total_sent_byte_size"` - TotalReceived int64 `json:"total_received"` - TotalSent int64 `json:"total_sent"` + NodeName string `json:"node_name"` + TotalReceivedByteSize int64 `json:"total_received_byte_size"` + TotalSentByteSize int64 `json:"total_sent_byte_size"` + TotalReceived int64 `json:"total_received"` + TotalSent int64 `json:"total_sent"` + Plumtree soraClusterRelayPlumtree `json:"plumtree"` +} + +type soraClusterRelayPlumtree struct { + TotalSentGossip int64 `json:"total_sent_gossip"` + TotalReceivedGossip int64 `json:"total_received_gossip"` + TotalSentIhave int64 `json:"total_sent_ihave"` + TotalReceivedIhave int64 `json:"total_received_ihave"` + TotalSentGraft int64 `json:"total_sent_graft"` + TotalReceivedGraft int64 `json:"total_received_graft"` + TotalSentPrune int64 `json:"total_sent_prune"` + TotalReceivedPrune int64 `json:"total_received_prune"` + TotalGraftMiss int64 `json:"total_graft_miss"` + TotalSkippedSend int64 `json:"total_skipped_send"` + TotalIgnored int64 `json:"total_ignored"` } type soraLicenseInfo struct { diff --git a/main_test.go b/main_test.go index 3ec7c00..0f208a6 100644 --- a/main_test.go +++ b/main_test.go @@ -31,14 +31,40 @@ var ( "total_received_byte_size": 11, "total_sent_byte_size": 12, "total_received": 13, - "total_sent": 14 + "total_sent": 14, + "plumtree": { + "total_sent_gossip": 1, + "total_received_gossip": 2, + "total_sent_ihave": 3, + "total_received_ihave": 4, + "total_sent_graft": 5, + "total_received_graft": 6, + "total_sent_prune": 7, + "total_received_prune": 8, + "total_graft_miss": 9, + "total_skipped_send": 10, + "total_ignored": 11 + } }, { "node_name": "node-02", "total_received_byte_size": 21, "total_sent_byte_size": 22, "total_received": 23, - "total_sent": 24 + "total_sent": 24, + "plumtree": { + "total_sent_gossip": 101, + "total_received_gossip": 102, + "total_sent_ihave": 103, + "total_received_ihave": 104, + "total_sent_graft": 105, + "total_received_graft": 106, + "total_sent_prune": 107, + "total_received_prune": 108, + "total_graft_miss": 109, + "total_skipped_send": 110, + "total_ignored": 111 + } } ], "erlang_vm": { diff --git a/test/maximum.metrics b/test/maximum.metrics index 8f93f55..c2393d2 100644 --- a/test/maximum.metrics +++ b/test/maximum.metrics @@ -38,6 +38,50 @@ sora_cluster_relay_sent_bytes_total{node_name="node-02"} 22 # TYPE sora_cluster_relay_sent_packets_total counter sora_cluster_relay_sent_packets_total{node_name="node-01"} 14 sora_cluster_relay_sent_packets_total{node_name="node-02"} 24 +# HELP sora_cluster_relay_plumtree_graft_miss_total The total number of Plumtree GRAFT messages missed by the cluster relay. +# TYPE sora_cluster_relay_plumtree_graft_miss_total counter +sora_cluster_relay_plumtree_graft_miss_total{node_name="node-01"} 9 +sora_cluster_relay_plumtree_graft_miss_total{node_name="node-02"} 109 +# HELP sora_cluster_relay_plumtree_ignored_total The total number of Plumtree messages received but ignored by the cluster relay. +# TYPE sora_cluster_relay_plumtree_ignored_total counter +sora_cluster_relay_plumtree_ignored_total{node_name="node-01"} 11 +sora_cluster_relay_plumtree_ignored_total{node_name="node-02"} 111 +# HELP sora_cluster_relay_plumtree_received_gossip_total The total number of Plumtree GOSSIP messages received by the cluster relay. +# TYPE sora_cluster_relay_plumtree_received_gossip_total counter +sora_cluster_relay_plumtree_received_gossip_total{node_name="node-01"} 2 +sora_cluster_relay_plumtree_received_gossip_total{node_name="node-02"} 102 +# HELP sora_cluster_relay_plumtree_received_graft_total The total number of Plumtree GRAFT messages received by the cluster relay. +# TYPE sora_cluster_relay_plumtree_received_graft_total counter +sora_cluster_relay_plumtree_received_graft_total{node_name="node-01"} 6 +sora_cluster_relay_plumtree_received_graft_total{node_name="node-02"} 106 +# HELP sora_cluster_relay_plumtree_received_ihave_total The total number of Plumtree IHAVE messages received by the cluster relay. +# TYPE sora_cluster_relay_plumtree_received_ihave_total counter +sora_cluster_relay_plumtree_received_ihave_total{node_name="node-01"} 4 +sora_cluster_relay_plumtree_received_ihave_total{node_name="node-02"} 104 +# HELP sora_cluster_relay_plumtree_received_prune_total The total number of Plumtree PRUNE messages received by the cluster relay. +# TYPE sora_cluster_relay_plumtree_received_prune_total counter +sora_cluster_relay_plumtree_received_prune_total{node_name="node-01"} 8 +sora_cluster_relay_plumtree_received_prune_total{node_name="node-02"} 108 +# HELP sora_cluster_relay_plumtree_sent_gossip_total The total number of Plumtree GOSSIP messages sent by the cluster relay. +# TYPE sora_cluster_relay_plumtree_sent_gossip_total counter +sora_cluster_relay_plumtree_sent_gossip_total{node_name="node-01"} 1 +sora_cluster_relay_plumtree_sent_gossip_total{node_name="node-02"} 101 +# HELP sora_cluster_relay_plumtree_sent_graft_total The total number of Plumtree GRAFT messages sent by the cluster relay. +# TYPE sora_cluster_relay_plumtree_sent_graft_total counter +sora_cluster_relay_plumtree_sent_graft_total{node_name="node-01"} 5 +sora_cluster_relay_plumtree_sent_graft_total{node_name="node-02"} 105 +# HELP sora_cluster_relay_plumtree_sent_ihave_total The total number of Plumtree IHAVE messages sent by the cluster relay. +# TYPE sora_cluster_relay_plumtree_sent_ihave_total counter +sora_cluster_relay_plumtree_sent_ihave_total{node_name="node-01"} 3 +sora_cluster_relay_plumtree_sent_ihave_total{node_name="node-02"} 103 +# HELP sora_cluster_relay_plumtree_sent_prune_total The total number of Plumtree PRUNE messages sent by the cluster relay. +# TYPE sora_cluster_relay_plumtree_sent_prune_total counter +sora_cluster_relay_plumtree_sent_prune_total{node_name="node-01"} 7 +sora_cluster_relay_plumtree_sent_prune_total{node_name="node-02"} 107 +# HELP sora_cluster_relay_plumtree_skipped_send_total The total number of Plumtree messages whose sending was skipped by the cluster relay. +# TYPE sora_cluster_relay_plumtree_skipped_send_total counter +sora_cluster_relay_plumtree_skipped_send_total{node_name="node-01"} 10 +sora_cluster_relay_plumtree_skipped_send_total{node_name="node-02"} 110 # HELP sora_client_type_total The total number of connections by Sora client types # TYPE sora_client_type_total counter sora_client_type_total{client="android_sdk",state="failed"} 1 diff --git a/test/sora_cluster_metrics_enabled.metrics b/test/sora_cluster_metrics_enabled.metrics index 88999b1..e3f6867 100644 --- a/test/sora_cluster_metrics_enabled.metrics +++ b/test/sora_cluster_metrics_enabled.metrics @@ -38,6 +38,50 @@ sora_cluster_relay_sent_bytes_total{node_name="node-02"} 22 # TYPE sora_cluster_relay_sent_packets_total counter sora_cluster_relay_sent_packets_total{node_name="node-01"} 14 sora_cluster_relay_sent_packets_total{node_name="node-02"} 24 +# HELP sora_cluster_relay_plumtree_graft_miss_total The total number of Plumtree GRAFT messages missed by the cluster relay. +# TYPE sora_cluster_relay_plumtree_graft_miss_total counter +sora_cluster_relay_plumtree_graft_miss_total{node_name="node-01"} 9 +sora_cluster_relay_plumtree_graft_miss_total{node_name="node-02"} 109 +# HELP sora_cluster_relay_plumtree_ignored_total The total number of Plumtree messages received but ignored by the cluster relay. +# TYPE sora_cluster_relay_plumtree_ignored_total counter +sora_cluster_relay_plumtree_ignored_total{node_name="node-01"} 11 +sora_cluster_relay_plumtree_ignored_total{node_name="node-02"} 111 +# HELP sora_cluster_relay_plumtree_received_gossip_total The total number of Plumtree GOSSIP messages received by the cluster relay. +# TYPE sora_cluster_relay_plumtree_received_gossip_total counter +sora_cluster_relay_plumtree_received_gossip_total{node_name="node-01"} 2 +sora_cluster_relay_plumtree_received_gossip_total{node_name="node-02"} 102 +# HELP sora_cluster_relay_plumtree_received_graft_total The total number of Plumtree GRAFT messages received by the cluster relay. +# TYPE sora_cluster_relay_plumtree_received_graft_total counter +sora_cluster_relay_plumtree_received_graft_total{node_name="node-01"} 6 +sora_cluster_relay_plumtree_received_graft_total{node_name="node-02"} 106 +# HELP sora_cluster_relay_plumtree_received_ihave_total The total number of Plumtree IHAVE messages received by the cluster relay. +# TYPE sora_cluster_relay_plumtree_received_ihave_total counter +sora_cluster_relay_plumtree_received_ihave_total{node_name="node-01"} 4 +sora_cluster_relay_plumtree_received_ihave_total{node_name="node-02"} 104 +# HELP sora_cluster_relay_plumtree_received_prune_total The total number of Plumtree PRUNE messages received by the cluster relay. +# TYPE sora_cluster_relay_plumtree_received_prune_total counter +sora_cluster_relay_plumtree_received_prune_total{node_name="node-01"} 8 +sora_cluster_relay_plumtree_received_prune_total{node_name="node-02"} 108 +# HELP sora_cluster_relay_plumtree_sent_gossip_total The total number of Plumtree GOSSIP messages sent by the cluster relay. +# TYPE sora_cluster_relay_plumtree_sent_gossip_total counter +sora_cluster_relay_plumtree_sent_gossip_total{node_name="node-01"} 1 +sora_cluster_relay_plumtree_sent_gossip_total{node_name="node-02"} 101 +# HELP sora_cluster_relay_plumtree_sent_graft_total The total number of Plumtree GRAFT messages sent by the cluster relay. +# TYPE sora_cluster_relay_plumtree_sent_graft_total counter +sora_cluster_relay_plumtree_sent_graft_total{node_name="node-01"} 5 +sora_cluster_relay_plumtree_sent_graft_total{node_name="node-02"} 105 +# HELP sora_cluster_relay_plumtree_sent_ihave_total The total number of Plumtree IHAVE messages sent by the cluster relay. +# TYPE sora_cluster_relay_plumtree_sent_ihave_total counter +sora_cluster_relay_plumtree_sent_ihave_total{node_name="node-01"} 3 +sora_cluster_relay_plumtree_sent_ihave_total{node_name="node-02"} 103 +# HELP sora_cluster_relay_plumtree_sent_prune_total The total number of Plumtree PRUNE messages sent by the cluster relay. +# TYPE sora_cluster_relay_plumtree_sent_prune_total counter +sora_cluster_relay_plumtree_sent_prune_total{node_name="node-01"} 7 +sora_cluster_relay_plumtree_sent_prune_total{node_name="node-02"} 107 +# HELP sora_cluster_relay_plumtree_skipped_send_total The total number of Plumtree messages whose sending was skipped by the cluster relay. +# TYPE sora_cluster_relay_plumtree_skipped_send_total counter +sora_cluster_relay_plumtree_skipped_send_total{node_name="node-01"} 10 +sora_cluster_relay_plumtree_skipped_send_total{node_name="node-02"} 110 # HELP sora_connections_total The total number of connections created. # TYPE sora_connections_total counter sora_connections_total{state="created"} 2 From b272d92c092b0077381dfaa620d157b6f6e78495 Mon Sep 17 00:00:00 2001 From: Takeru Ohta Date: Thu, 19 Dec 2024 11:39:10 +0900 Subject: [PATCH 3/3] Update CHANGES.md --- CHANGES.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 69b0e80..9a82a2e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,26 @@ - FIX - バグ修正 +## develop + +- [ADD] 多段リレー(Plumtree) 関連のメトリクスを追加する + - Sora 2025.1.0 で Sora API の GetStatsReport API に追加される予定の多段リレー関連の以下のメトリクスを追加する + - `cluster_relay_plumtree_sent_gossip_total` + - `cluster_relay_plumtree_received_gossip_total` + - `cluster_relay_plumtree_sent_ihave_total` + - `cluster_relay_plumtree_received_ihave_total` + - `cluster_relay_plumtree_sent_graft_total` + - `cluster_relay_plumtree_received_graft_total` + - `cluster_relay_plumtree_sent_prune_total` + - `cluster_relay_plumtree_received_prune_total` + - `cluster_relay_plumtree_graft_miss_total` + - `cluster_relay_plumtree_skipped_send_total` + - `cluster_relay_plumtree_ignored_total` + - @sile +- [ADD] `sora_srtp_sent_sfu_delay_us_total` メトリクスを追加する + - Sora 2025.1.0 で Sora API の GetStatsReport API に追加される予定のメトリクス + - @sile + ## 2024.7.0 **リリース日**: 2024-12-18