mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
Add metrics for Janus slow link events.
This commit is contained in:
parent
a5c7ad272f
commit
1f0ed8005a
3 changed files with 17 additions and 0 deletions
|
|
@ -65,3 +65,4 @@ The following metrics are available:
|
|||
| `signaling_mcu_peerconnection_state_total` | Counter | 2.0.5 | Total number PeerConnection states | `state`, `reason` |
|
||||
| `signaling_mcu_ice_state_total` | Counter | 2.0.5 | Total number of ICE connection states | `state` |
|
||||
| `signaling_mcu_dtls_state_total` | Counter | 2.0.5 | Total number of DTLS connection states | `state` |
|
||||
| `signaling_mcu_slow_link_total` | Counter | 2.0.5 | Total number of slow link events | `media`, `direction` |
|
||||
|
|
|
|||
|
|
@ -747,6 +747,15 @@ func (h *JanusEventsHandler) processEvent(event JanusEvent) {
|
|||
case *JanusEventWebRTCSelectedPair:
|
||||
statsJanusSelectedLocalCandidateTotal.WithLabelValues(evt.Candidates.Local.Type, evt.Candidates.Local.Transport, fmt.Sprintf("ipv%d", evt.Candidates.Local.Family)).Inc()
|
||||
statsJanusSelectedRemoteCandidateTotal.WithLabelValues(evt.Candidates.Remote.Type, evt.Candidates.Remote.Transport, fmt.Sprintf("ipv%d", evt.Candidates.Remote.Family)).Inc()
|
||||
case *JanusEventMediaSlowLink:
|
||||
var direction string
|
||||
// "uplink" is Janus -> client, "downlink" is client -> Janus.
|
||||
if evt.SlowLink == "uplink" {
|
||||
direction = "outgoing"
|
||||
} else {
|
||||
direction = "incoming"
|
||||
}
|
||||
statsJanusSlowLinkTotal.WithLabelValues(evt.Media, direction).Inc()
|
||||
case *JanusEventMediaStats:
|
||||
h.mcu.UpdateBandwidth(event.HandleId, evt.Media, api.BandwidthFromBytes(uint64(evt.BytesSentLastSec)), api.BandwidthFromBytes(uint64(evt.BytesReceivedLastSec)))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,6 +122,12 @@ var (
|
|||
Name: "dtls_state_total",
|
||||
Help: "Total number of DTLS connection states",
|
||||
}, []string{"state"})
|
||||
statsJanusSlowLinkTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Namespace: "signaling",
|
||||
Subsystem: "mcu",
|
||||
Name: "slow_link_total",
|
||||
Help: "Total number of slow link events",
|
||||
}, []string{"media", "direction"})
|
||||
|
||||
janusMcuStats = []prometheus.Collector{
|
||||
statsJanusBandwidthCurrent,
|
||||
|
|
@ -130,6 +136,7 @@ var (
|
|||
statsJanusPeerConnectionStateTotal,
|
||||
statsJanusICEStateTotal,
|
||||
statsJanusDTLSStateTotal,
|
||||
statsJanusSlowLinkTotal,
|
||||
}
|
||||
|
||||
statsConnectedProxyBackendsCurrent = prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue