Skip to content

Commit

Permalink
fix(loki_client): new payload API new log format
Browse files Browse the repository at this point in the history
  • Loading branch information
alextes committed Feb 19, 2024
1 parent 88bbbc3 commit 7c1113b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/phoenix/inclusion_monitor/loki_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl LokiClient {
slot: i64,
) -> anyhow::Result<Option<PublishedPayloadStats>> {
let query = format!(
r#"{{app="payload-api"}} |= `"slot":{slot}` |= "block published through beacon node""#
r#"{{app="payload-api"}} |= `"slot":"{slot}"` |= "block published through beacon node""#
);
let since = "24h";

Expand All @@ -121,7 +121,7 @@ impl LokiClient {

pub async fn late_call_stats(&self, slot: i64) -> anyhow::Result<Option<LatePayloadStats>> {
let query = format!(
r#"{{app="payload-api",level="warning"}} |= `"slot":{slot}` |= "getPayload sent too late""#
r#"{{app="payload-api",level="warning"}} |= `"slot":"{slot}"` |= "getPayload sent too late""#
);
let since = "24h";

Expand All @@ -143,7 +143,7 @@ impl LokiClient {
}

pub async fn error_messages(&self, slot: i64) -> anyhow::Result<Vec<String>> {
let query = format!(r#"{{app="payload-api",level="error"}} |= `"slot":{slot}`"#);
let query = format!(r#"{{app="payload-api",level="error"}} |= `"slot":"{slot}"`"#);
let slot = Slot(slot as i32);
let start = slot.date_time().timestamp_nanos();
let end = (slot.date_time() + chrono::Duration::seconds(12)).timestamp_nanos();
Expand Down

0 comments on commit 7c1113b

Please sign in to comment.