Overview
Yellowstone gRPC provides comprehensive Prometheus metrics for monitoring the health and performance of your gRPC plugin. The metrics endpoint exposes real-time data about connections, subscriptions, data flow, and system health.Configuration
Prometheus Endpoint
Configure the Prometheus metrics endpoint in yourconfig.json:
http://<address>/metrics in Prometheus text format.
Debug Endpoint
Enable the debug clients endpoint to view detailed information about active client connections:http://<address>/debug_clients.
Available Metrics
Version Information
Plugin version information including build timestamp, git commit, package version, proto version, rustc version, and Solana version.
Slot Metrics
Latest received slot from Geyser by commitment level (processed/confirmed/finalized).
Latest processed slot in the plugin to client queues by commitment level.
Connection Metrics
Total number of active connections to the gRPC service.
Total number of active subscriptions by endpoint and subscription type (accounts, slots, transactions, blocks, etc.).
Current concurrent subscriptions per remote TCP peer socket address.
Message Queue Metrics
Current size of the Geyser message queue. High values may indicate processing bottlenecks.
Current size of each subscriber’s channel queue by subscriber ID.
Data Flow Metrics
Number of messages sent over gRPC to downstream clients by subscriber ID.
Number of bytes sent over gRPC to downstream clients by subscriber ID.
Current send bandwidth load to subscriber channel in bytes per second by subscriber ID.
Total traffic sent to all subscribers.
Total traffic sent to subscribers by remote IP address.
Current emitted bytes by tonic service response bodies per active subscriber stream.
Block Reconstruction Metrics
Total number of failures when constructing full blocks, broken down by reason.
Client Metrics
Total client disconnections by subscriber ID and reason.
Number of missed messages by commitment level (processed/confirmed/finalized).
Geyser Plugin Metrics
Histogram of all account update data sizes (in KiB) received from the Geyser plugin.
Size of processed message batches from Geyser.
Performance Metrics
Pre-encoded cache hits by message type.
Pre-encoded cache misses by message type.
API Metrics
Total number of calls to gRPC methods (GetVersion, GetLatestBlockhash, GetBlockHeight, GetSlot, IsBlockhashValid, Ping).
Number of subscribe attempts that exceeded the per-subscriber limit by subscriber ID.
Monitoring Best Practices
Key Metrics to Alert On
-
Connection Saturation
- Monitor
connections_totaland set alerts for unusual spikes - Track
grpc_client_disconnects_totalto identify stability issues
- Monitor
-
Queue Backlog
- Alert on high
message_queue_size(>10,000 messages) - Monitor
grpc_subscriber_queue_sizeper client
- Alert on high
-
Block Reconstruction Failures
- Alert on increasing
invalid_full_blocks_total - This indicates potential data integrity issues
- Alert on increasing
-
Bandwidth Saturation
- Track
grpc_subscriber_send_bandwidth_loadper client - Monitor
total_traffic_sent_bytesgrowth rate
- Track
-
Slot Processing Lag
- Compare
slot_statusvsslot_status_pluginto detect processing delays - Alert if the gap exceeds acceptable thresholds
- Compare
Example Prometheus Queries
Grafana Dashboard
Create a Grafana dashboard with these panels:-
Overview
- Total connections
- Total subscriptions
- Message queue size
- Current slot numbers
-
Performance
- Message throughput (messages/sec)
- Bandwidth usage (bytes/sec)
- Cache hit rate
- Batch sizes
-
Health
- Invalid block count
- Client disconnects
- Missed messages
- Queue sizes per subscriber
-
Resource Usage
- Bandwidth per IP
- Concurrent subscriptions per connection
- Queue backlogs