mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
Add metric for RTT of WebSocket ping messages.
This commit is contained in:
parent
40ff197bd0
commit
71fda2f258
3 changed files with 10 additions and 0 deletions
|
|
@ -353,6 +353,7 @@ func (c *Client) ReadPump() {
|
|||
log.Printf("Client from %s has RTT of %d ms (%s)", addr, rtt_ms, rtt)
|
||||
}
|
||||
}
|
||||
statsClientRTT.Observe(float64(rtt.Milliseconds()))
|
||||
c.getHandler().OnRTTReceived(c, rtt)
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -32,9 +32,17 @@ var (
|
|||
Name: "countries_total",
|
||||
Help: "The total number of connections by country",
|
||||
}, []string{"country"})
|
||||
statsClientRTT = prometheus.NewHistogram(prometheus.HistogramOpts{
|
||||
Namespace: "signaling",
|
||||
Subsystem: "client",
|
||||
Name: "rtt",
|
||||
Help: "The roundtrip time of WebSocket ping messages in milliseconds",
|
||||
Buckets: prometheus.ExponentialBucketsRange(1, 30000, 50),
|
||||
})
|
||||
|
||||
clientStats = []prometheus.Collector{
|
||||
statsClientCountries,
|
||||
statsClientRTT,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -59,3 +59,4 @@ The following metrics are available:
|
|||
| `signaling_mcu_backend_usage` | Gauge | 2.0.5 | The current usage of signaling proxy backends in percent | `url`, `direction` |
|
||||
| `signaling_mcu_backend_bandwidth` | Gauge | 2.0.5 | The current bandwidth of signaling proxy backends in bytes per second | `url`, `direction` |
|
||||
| `signaling_proxy_load` | Gauge | 2.0.5 | The current load of the signaling proxy | |
|
||||
| `signaling_client_rtt` | Histogram | 2.0.5 | The roundtrip time of WebSocket ping messages in milliseconds | |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue