@@ -68,6 +68,26 @@ cargo run --release -- --mode account --accounts <PUBKEY1,PUBKEY2>
6868cargo run --release -- --metrics-addr 0.0.0.0:9999
6969```
7070
71+ ### Docker Compose (Recommended for Production)
72+
73+ Start with Prometheus and Grafana:
74+
75+ ``` bash
76+ # Build and start all services
77+ docker-compose up -d
78+
79+ # View logs
80+ docker-compose logs -f solana-event-listener
81+
82+ # Stop services
83+ docker-compose down
84+ ```
85+
86+ Access dashboards:
87+ - ** Prometheus** : http://localhost:9090
88+ - ** Grafana** : http://localhost:3000 (default: ` admin ` /` admin ` )
89+ - ** Metrics** : http://localhost:9108/metrics
90+
7191### Check Metrics
7292
7393``` bash
@@ -118,6 +138,27 @@ CLI flags override environment variables.
118138{"timestamp" :" 2024-01-15T10:30:45Z" ,"pubkey" :" Address..." ,"slot" :12345 ,"lamports" :1000000 ,"data" :" base64..." }
119139```
120140
141+ ## Terminal Output Example
142+
143+ Running in logs mode produces output like:
144+
145+ ```
146+ $ cargo run --release -- --mode logs --program-id ComputeBudget111111111111111111111111111111
147+
148+ 2024-01-15T10:30:45.123Z INFO Starting Solana Event Listener v0.1.0
149+ 2024-01-15T10:30:45.125Z INFO Configuration loaded: mode=logs
150+ 2024-01-15T10:30:45.126Z INFO Metrics registry initialized
151+ 2024-01-15T10:30:45.127Z INFO Metrics server spawned on 0.0.0.0:9108
152+ 2024-01-15T10:30:45.128Z INFO Storage initialized: ./events.jsonl
153+ 2024-01-15T10:30:45.129Z INFO Starting logs subscription mode
154+ 2024-01-15T10:30:45.130Z INFO Connecting to Solana WebSocket: wss://api.mainnet-beta.solana.com/
155+ 2024-01-15T10:30:45.456Z INFO Connected to WebSocket
156+ 2024-01-15T10:30:45.457Z INFO Sending subscription request for program: ComputeBudget111111111111111111111111111111
157+ 2024-01-15T10:30:45.500Z INFO Subscribed to logs for program: ComputeBudget111111111111111111111111111111
158+ 2024-01-15T10:30:46.200Z INFO Event: signature=5VeK..., slot=245000000, program=ComputeBudget111111111111111111111111111111, log_lines=3
159+ 2024-01-15T10:30:47.100Z INFO Event: signature=7XmP..., slot=245000001, program=ComputeBudget111111111111111111111111111111, log_lines=2
160+ ```
161+
121162## Architecture
122163
123164```
0 commit comments