From 37f372d1b8cd5f093103e7263d97b0bf91f6ab58 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Wed, 31 Aug 2022 19:36:11 +0100 Subject: [PATCH] feat(chalice): metrics fixed wrong table name --- ee/api/chalicelib/core/metrics_exp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/api/chalicelib/core/metrics_exp.py b/ee/api/chalicelib/core/metrics_exp.py index 2084cab2e..04e180e93 100644 --- a/ee/api/chalicelib/core/metrics_exp.py +++ b/ee/api/chalicelib/core/metrics_exp.py @@ -806,7 +806,7 @@ def get_missing_resources_trend(project_id, startTimestamp=TimeUTC.now(delta_day rows = [{"url": i["key"], "sessions": i["doc_count"]} for i in rows] if len(rows) == 0: return [] - ch_sub_query.append("events.url_path = %(value)s") + ch_sub_query.append("resources.url_path = %(value)s") ch_query = f"""SELECT toUnixTimestamp(toStartOfInterval(resources.datetime, INTERVAL %(step_size)s second ))*1000 AS timestamp, COUNT(1) AS doc_count, toUnixTimestamp(MAX(resources.datetime))*1000 AS max_datatime