Skip to content

Commit

Permalink
fix(sherlock): logged missing metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
isala404 committed Mar 31, 2022
1 parent a46a587 commit f0fe3a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sherlock/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async fn query_prometheus(query: &str, time: DateTime<Local>) -> Result<f64, Bo

let response = CLIENT.query(v, Some(time.timestamp()), None).await?;

let value = response.as_instant().ok_or("query was empty")?.get(0).ok_or("metric not found")?.sample().value();
let value = response.as_instant().ok_or("query was empty")?.get(0).ok_or(format!("metric {} not found", query))?.sample().value();

Ok(value)
}
Expand Down

0 comments on commit f0fe3a9

Please sign in to comment.