metrics: optional OpenMetrics/Prometheus endpoint (metrics_bind, off by default) — commands/messages/connects counters bumped inline via shared atomics, users/channels/servers/links gauges republished each tick; no event round-trip on the hot path
This commit is contained in:
parent
30754f08b5
commit
d4dadf33e6
6 changed files with 114 additions and 0 deletions
|
|
@ -439,6 +439,9 @@ impl Server {
|
|||
if let Some(u) = self.users.get_mut(&uid) {
|
||||
u.registered = true;
|
||||
}
|
||||
self.metrics
|
||||
.connects
|
||||
.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
|
||||
let nick = self
|
||||
.users
|
||||
.get(&uid)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue