Monitoring & Analytics
OmniSocial offers a Prometheus + Grafana-based monitoring stack to ensure reliability across its infrastructure, including relayers, the subgraph, and optional full nodes.
This guide outlines the setup and key metrics you should track to maintain performance and availability.
🧩 Monitoring Stack Overview
Prometheus
Metrics collection and scraping
Grafana
Dashboard visualization
Health API
Local HTTP health checks
All services expose Prometheus-compatible endpoints.
🧪 Monitored Components
1. Relayer Nodes
If you operate a relayer (for meta-transactions or fee abstraction), monitor:
✅ Transaction submission success rate
📦 Queue backlog (pending tx count)
🧾 Signed tx per second
❗ Failures (e.g.,
insufficient funds
,nonce too low
)
Relayer Metrics Exported:
relayer_tx_count_total{status="success|fail"}
relayer_queue_length
relayer_gas_usage_avg
2. Subgraph Indexer
The subgraph exposes important sync and indexing metrics:
📊 Block synchronization lag
🔄 Reorg detection
⚠️ Failed handlers or dropped events
Key Metrics:
subgraph_block_lag
subgraph_latest_block
subgraph_processed_events_total
🛠 Note: You can also query the subgraph status via The Graph's /status
endpoint:
{
indexingStatusForCurrentVersion(subgraphName: "omnisocial/zk-mainnet") {
synced
health
fatalError { message }
chains {
latestBlock { number }
chainHeadBlock { number }
}
}
}
3. OmniSocial Web App
You may optionally monitor the dApp frontend for SSR errors, API rate limits, and network status. For production builds:
Use Vercel Analytics or OpenTelemetry.
For self-hosted versions, Prometheus can monitor:
frontend_http_requests_total
frontend_page_load_time_avg
frontend_graphql_query_latency
4. Wallet Relayer Services
If you're running the OmniWallet relayer, you can enable Prometheus metrics via a --metrics
flag or .env
setting:
ENABLE_METRICS=true
METRICS_PORT=9090
Exposes metrics like:
Relayed txs per address
Signature verification success/failure
Gas cost per transaction
🧾 Health Check Endpoints
Each service exposes a basic health route:
Subgraph
/health
{"healthy":true}
Relayer
/status
or /health
HTTP 200/500
Frontend
/api/health
pong
You can plug these into uptime monitoring tools like UptimeRobot, BetterStack, or Grafana OnCall.
📊 Grafana Dashboards
OmniSocial maintains default dashboards with the following panels:
⚙️ Infrastructure overview
🔁 Subgraph sync and block lag
📤 Relayer performance
⏱ GraphQL query latency
📈 Live system usage (DAOs, tips, posts per minute)
Dashboards can be imported from
infra/monitoring/dashboards/*.json
if running locally.
📌 Optional Setup Script
For self-hosted deployments, we provide:
infra/monitoring/docker-compose.yml
Which includes:
Prometheus
Grafana (port
:3000
, default credsadmin/admin
)Node exporter
Alertmanager (optional)
Last updated
Was this helpful?