Prometheus Metrics #

This page provides a reference for the metrics collected by Nakama and available for export to Prometheus.

Snapshot Metrics #

NameTypeDescriptionUsage
SnapshotLatencyMsGaugeAverage latency of requests in milliseconds over a snapshot period.Identifying average request time, indicating system performance.
SnapshotRateSecGaugeNumber of requests per second in the snapshot interval.Tracking the request rate, understanding system load.
SnapshotRecvKbSecGaugeRate of data received in kilobytes per second.Monitoring incoming traffic rate, bandwidth management, performance tuning.
SnapshotSentKbSecGaugeRate of data sent in kilobytes per second.Assessing outgoing traffic, system output performance.

API Metrics #

NameTypeDescriptionUsage
ApiCounter, TimerMetrics for API calls: request count, latency, bytes received/sent, errors.Comprehensive view of API performance and error rates.
ApiRpcCounter, TimerSimilar to Api, specific to RPC calls with rpc_id tagging.Detailed insights into RPC call performance.
ApiBeforeCounter, TimerMetrics for pre-processing phases of API calls.Analyzing overhead or actions before main API processing.
ApiAfterCounter, TimerMetrics for post-processing phases of API calls.Understanding post-processing steps in API execution.

Message Metrics #

NameTypeDescriptionUsage
MessageCounterCount and size of received messages and error occurrences.Monitoring volume and health of message traffic.
MessageBytesSentCounterTotal bytes sent in messages.Tracking amount of data sent in messages.

Gauge Metrics #

NameTypeDescriptionUsage
GaugeRuntimesGaugeCurrent value for runtime gauges.Tracking number of runtime instances.
GaugeLuaRuntimesGaugeNumber of Lua runtime VMs.Lua VM management, resource usage and bottleneck analysis.
GaugeJsRuntimesGaugeCount of JavaScript runtime VMs.JavaScript VM performance and resource allocation monitoring.
GaugeAuthoritativeMatchesGaugeCurrent count of authoritative matches.Load balancing and resource allocation for gaming servers.
GaugeSessionsGaugeNumber of active sessions.Understanding user engagement and server load.
GaugePresencesGaugeNumber of user presences.Tracking active user interactions, real-time features.
GaugeStorageIndexEntriesGaugeCount of entries in a specific storage index.Database performance and index management.

Count Metrics #

NameTypeDescriptionUsage
CountDroppedEventsCounterIncrements count of dropped events.Identifying issues with event handling.
CountWebsocketOpenedCounterNumber of opened WebSocket connections.Monitoring WebSocket connection stability and usage.
CountWebsocketClosedCounterNumber of closed WebSocket connections.Analyzing WebSocket disconnections.
StorageWriteRejectCountCounterCount of rejected storage write operations.Data integrity monitoring, storage operation issues.

Custom Metrics #

NameTypeDescriptionUsage
CustomCounterCounterCustom counter with specified name and tags.Tracking specific metrics tailored to application.
CustomGaugeGaugeCustom gauge metrics.Monitoring specific custom application scenarios.
CustomTimerTimerCustom timer metrics.Measuring specific time-bound operations.