Skip to content

Commit ed90748

Browse files
authored
Feat/metrics exporter (#17)
1 parent 78065b3 commit ed90748

File tree

7 files changed

+405
-59
lines changed

7 files changed

+405
-59
lines changed

Cargo.lock

Lines changed: 181 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pythnet-watcher"
3-
version = "1.0.0"
3+
version = "1.1.0"
44
edition = "2021"
55

66
[dependencies]
@@ -29,6 +29,10 @@ tokio-stream = "0.1.17"
2929
tracing = "0.1.41"
3030
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "json"] }
3131
wormhole-vaas-serde = "0.1.0"
32+
axum = "0.8.4"
33+
metrics = "0.24.2"
34+
lazy_static = "1.5.0"
35+
axum-prometheus = "0.9.0"
3236

3337
[dev-dependencies]
3438
serde_json = "1.0.140"

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,10 @@ This will save the key in raw byte format to the file named `.secret`.
8484
### 🧪 Testing Locally
8585

8686
To test in a non-production environment (e.g. with devnet or a local Pythnet fork), just provide a different `--pythnet-url`, and `--server-url`, and optionally use custom `--wormhole-pid`.
87+
88+
---
89+
90+
### 📊 Metrics
91+
92+
By default, running the watcher exposes metrics at `http://127.0.0.1:9001`.
93+
You can change the metrics endpoint by passing the `--metrics-addr` flag or setting the `METRICS_ADDR` environment variable.

0 commit comments

Comments
 (0)