
When a Solana program is stay, its transactions inform an in depth story. An instruction can fail, an occasion can sign a big switch, or a multisig can approve a change to this system. Discovering the exercise that issues, and figuring out whether or not the monitoring pipeline itself is wholesome, takes greater than a stream of uncooked logs.
Microscope is an open-source, self-hosted monitoring and alerting software for Solana packages. It decodes a program’s directions and occasions utilizing its IDL, turns that exercise into Grafana dashboards, and sends alerts to Slack, Telegram, or PagerDuty. It will possibly additionally watch the Squads multisig that controls this system. The supply code is out there on GitHub underneath the MIT license.
From transactions to alerts
Microscope reads confirmed transactions by means of a Yellowstone gRPC stream or a Solana RPC endpoint. Its indexer decodes the directions and occasions related to this system, then sends structured data to Loki and metrics to Prometheus. Grafana makes use of these data and metrics to point out program exercise over time and consider alert guidelines. One deployment displays one program and, optionally, one Squads multisig.
That decoded information makes alerts extra exact. A staff can write a rule for a specific instruction or occasion, test a subject reminiscent of an quantity, and select which channel receives the notification. A rule may watch multisig actions, together with proposal approvals. Alerts are primarily based on decoded exercise somewhat than matches in opposition to uncooked log textual content.
The dashboard offers groups one other technique to examine. It exhibits transaction and instruction error charges, decoded directions by kind, latest program occasions, and multisig exercise. If the datasource makes use of RPC polling, it additionally exhibits polling well being. A failed on-chain instruction seems as program exercise; it doesn’t imply the indexer failed.
Know when the monitoring pipeline wants consideration
An empty dashboard can imply a program is quiet, however it will possibly additionally imply information has stopped flowing. Microscope consists of well being alerts for its personal pipeline, masking situations reminiscent of a stalled stream, stale RPC polls, a corrupt checkpoint, or data which can be decoded however don’t attain Loki. This helps groups test the monitoring system earlier than drawing conclusions about this system.
Alerts carry a signal_kind label. Exercise alerts determine an instruction, occasion, or multisig motion; a datasource alert factors to an issue with the monitoring pipeline. The challenge additionally features a analysis workflow and an operations information for working by means of incidents.
Get began with Microscope
Microscope can run as a Docker Compose stack on a machine or server, or on an AWS or GCP VM utilizing Terraform. Groups with Grafana Cloud can join the indexer and Alloy to an current stack. The challenge additionally supplies Kubernetes reference manifests for groups already working their very own observability infrastructure.
To configure a deployment, present this system ID and IDL, select a transaction supply, and outline the exercise that ought to set off alerts. A Squads multisig is optionally available. The repository features a setup-deployment ability to assist an AI agent put together and validate the configuration, together with a Jupiter Lend walkthrough that demonstrates the stack with a pattern set of alerts.
Discover the Microscope product web page for the deployment choices, dashboard examples, and a more in-depth take a look at its alert configuration. The GitHub repository has the code and set up directions.
