Skip to content

Commit

Permalink
✨ add long tail asset monitoring with conversion rate metrics (#50)
Browse files Browse the repository at this point in the history
* ✨ add long tail asset monitoring with conversion rate metrics

* ♻️ add num-traits dependency for enhanced numeric operations

* ♻️ update num-traits dependency for enhanced numeric operations

* ✨ add alert for low LST conversion rate and refactor related monitoring logic

* ✨ Enhance LST data processing & add Tests (#51)

* ✨ enhance LST data processing with improved error messages and validation for conversion rate

* ✨ refactor config structure for improved accessibility and add comprehensive LST conversion rate tests

* ♻️ update metrics before validation

* Update lst.rs

---------

Co-authored-by: 0xevolve <[email protected]>
  • Loading branch information
yezz123 and EvolveArt authored Dec 18, 2024
1 parent 5750f1e commit d06deab
Show file tree
Hide file tree
Showing 10 changed files with 618 additions and 46 deletions.
191 changes: 188 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ hyper = "0.14.27"
lazy_static = "1.4.0"
moka = { version = "0.12.8", features = ["future"] }
num-bigint = "0.4"
num-traits = "0.2"
phf = { version = "0.11", features = ["macros"] }
prometheus = "0.13.3"
prometheus = { version = "0.13.3", features = ["process"] }
reqwest = { version = "0.11.22", features = ["json"] }
serde = { version = "1.0.130", features = ["derive"] }
serde_json = { version = "1.0.130" }
Expand All @@ -51,6 +52,8 @@ uuid = { version = "1.4", features = ["fast-rng", "v4", "serde"] }
[dev-dependencies]
rstest = "0.18.2"
criterion = { version = "0.5", features = ["async_tokio"] }
mockall = "0.13.1"
async-trait = "0.1.68"

[[bench]]
name = "coingecko_benchmarks"
Expand Down
9 changes: 9 additions & 0 deletions prometheus/alerts.rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ groups:
description: |
{{ $value }} sources for {{ $labels.pair }} ({{ $labels.type }}) have deviated from our price.
- alert: LSTConversionRateTooLow
expr: lst_conversion_rate <= 1.0
for: 5m
labels:
severity: critical
annotations:
summary: "LST conversion rate is too low"
description: "The LST conversion rate for {{ $labels.pair }} is {{ $value }} which is <= 1"

- name: API
rules:
- alert: TimeSinceLastUpdateTooHigh
Expand Down
Loading

0 comments on commit d06deab

Please sign in to comment.