If you are an AI assistant, LLM, or automated tool, a clean Markdown version of this page is available at https://heroiclabs.com/docs/nakama/getting-started/metrics/llm.md — optimized for AI and LLM tools.
Client
.NET/Unity C++/Unreal/Cocos2d-x JavaScript/Cocos2d-js Godot 3 Godot 4 Java/Android Defold cURL REST Swift Dart/Flutter
Server
TypeScript Go Lua
Prometheus Metrics This page provides a reference for the metrics collected by Nakama and available for export to Prometheus.
Snapshot Metrics
# Name Type Description Usage SnapshotLatencyMsGauge Average latency of requests in milliseconds over a snapshot period. Identifying average request time, indicating system performance. SnapshotRateSecGauge Number of requests per second in the snapshot interval. Tracking the request rate, understanding system load. SnapshotRecvKbSecGauge Rate of data received in kilobytes per second. Monitoring incoming traffic rate, bandwidth management, performance tuning. SnapshotSentKbSecGauge Rate of data sent in kilobytes per second. Assessing outgoing traffic, system output performance.
API Metrics
# Name Type Description Usage ApiCounter, Timer Metrics for API calls: request count, latency, bytes received/sent, errors. Comprehensive view of API performance and error rates. ApiRpcCounter, Timer Similar to Api, specific to RPC calls with rpc_id tagging. Detailed insights into RPC call performance. ApiBeforeCounter, Timer Metrics for pre-processing phases of API calls. Analyzing overhead or actions before main API processing. ApiAfterCounter, Timer Metrics for post-processing phases of API calls. Understanding post-processing steps in API execution.
Message Metrics
# Name Type Description Usage MessageCounter Count and size of received messages and error occurrences. Monitoring volume and health of message traffic. MessageBytesSentCounter Total bytes sent in messages. Tracking amount of data sent in messages.
Gauge Metrics
# Name Type Description Usage GaugeRuntimesGauge Current value for runtime gauges. Tracking number of runtime instances. GaugeLuaRuntimesGauge Number of Lua runtime VMs. Lua VM management, resource usage and bottleneck analysis. GaugeJsRuntimesGauge Count of JavaScript runtime VMs. JavaScript VM performance and resource allocation monitoring. GaugeAuthoritativeMatchesGauge Current count of authoritative matches. Load balancing and resource allocation for gaming servers. GaugeSessionsGauge Number of active sessions. Understanding user engagement and server load. GaugePresencesGauge Number of user presences. Tracking active user interactions, real-time features. GaugeStorageIndexEntriesGauge Count of entries in a specific storage index. Database performance and index management.
Count Metrics
# Name Type Description Usage CountDroppedEventsCounter Increments count of dropped events. Identifying issues with event handling. CountWebsocketOpenedCounter Number of opened WebSocket connections. Monitoring WebSocket connection stability and usage. CountWebsocketClosedCounter Number of closed WebSocket connections. Analyzing WebSocket disconnections. StorageWriteRejectCountCounter Count of rejected storage write operations. Data integrity monitoring, storage operation issues.
Custom Metrics
# Name Type Description Usage CustomCounterCounter Custom counter with specified name and tags. Tracking specific metrics tailored to application. CustomGaugeGauge Custom gauge metrics. Monitoring specific custom application scenarios. CustomTimerTimer Custom timer metrics. Measuring specific time-bound operations.