Monitoring Execution
After deploying a Retroshades program you can inspect its runtime status, per-transaction execution history and aggregate statistics through three endpoints.
Program status
Returns aggregate statistics for a deployed program. Counts are computed over the 500 most recent execution records retained per program.
Endpoint: GET /retroshade/{id}/status
Auth: JWT required
curl https://mainnet.mercurydata.app/rest/retroshade/1/status \
-H "Authorization: Bearer <yourjwt>"Response:
{
"program_id": 1,
"project_name": "my-retroshade-program",
"running": true,
"last_success_ledger": 62549580,
"last_error_ledger": null,
"last_error_message": null,
"total_executions": 500,
"total_errors": 0,
"avg_execution_ms": 3
}Execution log
Returns a paginated list of per-transaction execution records, newest first. Up to 500 records are retained per program.
Endpoint: GET /retroshade/{id}/executions
Auth: JWT required
Query params:
limit
50
200
Number of records to return
from_ledger
--
--
Return only records at or before this ledger sequence
Response:
status is either "success" or "error". On error, error_message contains the failure detail and rows_written will be 0.
Per-ledger stats
Returns per-ledger aggregate stats for a program, ordered newest first. Useful for tracking throughput and spotting error spikes across ledgers. Records older than 30 days are pruned automatically.
Endpoint: GET /retroshade/{id}/stats
Auth: JWT required
Query params:
source
Filter by live or backfill (default: all)
from
Return records at or after this ledger sequence
to
Return records at or before this ledger sequence
limit
Number of records to return
Response:
source is "live" for normal ingestion and "backfill" for backfill runs.
Make sure to change the endpoint if you're on testnet.
Last updated