Skip to content

Commit

Permalink
fix: api query path
Browse files Browse the repository at this point in the history
  • Loading branch information
EvolveArt committed Jan 25, 2024
1 parent 89de531 commit ab7f6b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions prometheus/alerts.rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ groups:
for: 5m
labels:
severity: warning
group: API
annotations:
summary: "Time since the last update is too high"
description: "The time since the last update for {{ $labels.pair }} has exceeded 1800 seconds."
Expand All @@ -72,6 +73,7 @@ groups:
for: 5m
labels:
severity: warning
group: API
annotations:
summary: "Price deviation is too high"
description: "The price deviation of {{ $labels.pair }} from DefiLlama has exceeded 2.5%."
Expand All @@ -80,6 +82,7 @@ groups:
for: 5m
labels:
severity: critical
group: API
annotations:
summary: "Too few sources"
description: "The number of sources for {{ $labels.pair }} has fallen below 1."
Expand All @@ -88,6 +91,7 @@ groups:
for: 5m
labels:
severity: critical
group: API
annotations:
summary: "Sequencer deviation is too high"
description: "The ETH/STRK price has deviated from the sequencer price by more than 2%."
4 changes: 2 additions & 2 deletions src/processing/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ pub async fn query_pragma_api(
) -> Result<PragmaDataDTO, MonitoringError> {
let request_url = match network_env {
"Testnet" => format!(
"https://api.dev.pragma.build/node/v1/data/{pair}?routing=true",
"https://api.dev.pragma.build/node/v1/data/{pair}?aggregation=median&interval=1min&routing=true",
pair = pair,
),
"Mainnet" => format!(
"https://api.prod.pragma.build/node/v1/data/{pair}?routing=true",
"https://api.prod.pragma.build/node/v1/data/{pair}?aggregation=median&interval=1min&routing=true",
pair = pair,
),
_ => panic!("Invalid network env"),
Expand Down

0 comments on commit ab7f6b1

Please sign in to comment.