From 59634139c902bde1c8ba6541be14ee73ab28b420 Mon Sep 17 00:00:00 2001 From: yenicelik Date: Sun, 21 May 2023 20:27:52 -0400 Subject: [PATCH] updated error_response --- web3_proxy/src/stats/influxdb_queries.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/web3_proxy/src/stats/influxdb_queries.rs b/web3_proxy/src/stats/influxdb_queries.rs index f31bf2e9..69d1110c 100644 --- a/web3_proxy/src/stats/influxdb_queries.rs +++ b/web3_proxy/src/stats/influxdb_queries.rs @@ -190,7 +190,6 @@ pub async fn query_user_stats<'a>( |> aggregateWindow(every: {query_window_seconds}s, fn: sum, createEmpty: false) |> pivot(rowKey: ["_time"], columnKey: ["_field"], valueColumn: "_value") |> drop(columns: ["balance"]) - |> map(fn: (r) => ({{ r with "error_response": if r.error_response == "true" then r.frontend_requests else 0}})) |> group(columns: ["_time", "_measurement", "archive_needed", "chain_id", "error_response", "method", "rpc_secret_key_id"]) |> sort(columns: ["frontend_requests"]) |> map(fn:(r) => ({{ r with "sum_credits_used": float(v: r["sum_credits_used"]) }}))