You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/price_pusher/README.md
+88Lines changed: 88 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -259,3 +259,91 @@ pushed twice and you won't pay additional costs most of the time.** However, the
259
259
conditions in the RPCs because they are often behind a load balancer which can sometimes cause rejected
260
260
transactions to land on-chain. You can reduce the chances of additional cost overhead by reducing the
261
261
pushing frequency.
262
+
263
+
## Prometheus Metrics
264
+
265
+
The price_pusher now supports Prometheus metrics to monitor the health and performance of the price update service. Metrics are exposed via an HTTP endpoint that can be scraped by Prometheus.
266
+
267
+
### Available Metrics
268
+
269
+
The following metrics are available:
270
+
271
+
- **pyth_price_last_published_time**: The last published time of a price feed in unix timestamp
272
+
- **pyth_price_updates_total**: Total number of price updates pushed to the chain
273
+
- **pyth_price_update_duration_seconds**: Duration of price update operations in seconds
274
+
- **pyth_active_price_feeds**: Number of active price feeds being monitored
275
+
- **pyth_price_update_errors_total**: Total number of errors encountered during price updates
276
+
- **pyth_price_update_attempts_total**: Total number of price update attempts
277
+
278
+
### Configuration
279
+
280
+
Metrics are enabled by default and can be configured using the following command-line options:
281
+
282
+
- `--enable-metrics`: Enable or disable the Prometheus metrics server (default: true)
283
+
- `--metrics-port`: Port for the Prometheus metrics server (default: 9090)
docker run -d --name grafana -p 3000:3000 grafana/grafana
319
+
```
320
+
321
+
4. Access Grafana at http://localhost:3000 (default credentials: admin/admin) and add Prometheus as a data source (URL: http://host.docker.internal:9090).
322
+
323
+
### Example Grafana Queries
324
+
325
+
Here are some example Grafana queries to monitor your price feeds:
0 commit comments