Skip to content
Snippets Groups Projects
Unverified Commit 479b3e38 authored by Ngoc Khuat's avatar Ngoc Khuat Committed by GitHub
Browse files

limit the anon stats on query execution to 30 days (#46560)

parent a97bdb25
No related branches found
No related tags found
No related merge requests found
......@@ -362,6 +362,8 @@
;;; Execution Metrics
(def ^:private query-execution-window-days 30)
(defn- summarize-executions
"Summarize `executions`, by incrementing approriate counts in a summary map."
([]
......@@ -369,7 +371,8 @@
[:= :error nil ] false
[:= :error "" ] false
:else true] :has_error]]
:from [:query_execution]})))
:from [:query_execution]
:where [:> :started_at (t/minus (t/offset-date-time) (t/days query-execution-window-days))]})))
([executions]
(reduce summarize-executions {:executions 0, :by_status {}, :num_per_user {}, :num_by_latency {}} executions))
([summary execution]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment