Expand description
Observability emission layer for naia game networking.
Emits network health data — RTT, jitter, packet loss, bandwidth — via the
metrics crate facade. Install any compatible exporter at startup and
naia’s data flows to your monitoring backend automatically.
§Non-Bevy usage
Call once per tick after server.send_all_packets():
ⓘ
naia_metrics::emit_server_aggregates(
server.user_count(),
server.entity_count(),
server.room_count(),
);
for user_key in server.user_keys() {
if let Some(stats) = server.connection_stats(&user_key) {
naia_metrics::emit_server_connection_stats(&stats, user_key.to_u64());
}
}For Bevy apps, use [naia-bevy-metrics] instead — it handles emission
automatically via a plugin.
Modules§
Functions§
- emit_
client_ connection_ stats - Emit the five client-side connection gauges.
- emit_
server_ aggregates - Emit the three server-wide aggregate gauges.
- emit_
server_ connection_ stats - Emit the six per-connection gauges for one user.