You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a new config and metric for reporting ruler query execution wall time. (#4317)
* Add a new config and metric for reporting ruler query execution wall time.
Signed-off-by: Tyler Reid <[email protected]>
* Spacing and PR number fixup
Signed-off-by: Tyler Reid <[email protected]>
* Wrap the defer in a function to make it defer after the return rather than after the if block. Add a unit test to validate we're tracking time correctly.
Signed-off-by: Tyler Reid <[email protected]>
* Use seconds for our duration rather than nanoseconds
Signed-off-by: Tyler Reid <[email protected]>
* Review comment fixes
Signed-off-by: Tyler Reid <[email protected]>
* Update config flag in the config docs
Signed-off-by: Tyler Reid <[email protected]>
* Pass counter rather than counter vector for metrics query function
Signed-off-by: Tyler Reid <[email protected]>
* Fix comment in MetricsQueryFunction
Signed-off-by: Tyler Reid <[email protected]>
* Move query metric and log to separate function. Add log message for ruler query time.
Signed-off-by: Tyler Reid <[email protected]>
* Update config file and change log to show this a per user metric
Signed-off-by: Tyler Reid <[email protected]>
* code review fixes
Signed-off-by: Tyler Reid <[email protected]>
* update log message for ruler query metrics
Signed-off-by: Tyler Reid <[email protected]>
* Remove append and just use the array for key values in the log messag
Signed-off-by: Tyler Reid <[email protected]>
* Add query-frontend component to front end log message
Signed-off-by: Tyler Reid <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# Changelog
2
2
3
3
## master / unreleased
4
+
*[FEATURE] Ruler: Add new `-ruler.query-stats-enabled` which when enabled will report the `cortex_ruler_query_seconds_total` as a per-user metric that tracks the sum of the wall time of executing queries in the ruler in seconds. #4317
4
5
5
6
*[CHANGE] Querier / ruler: Change `-querier.max-fetched-chunks-per-query` configuration to limit to maximum number of chunks that can be fetched in a single query. The number of chunks fetched by ingesters AND long-term storare combined should not exceed the value configured on `-querier.max-fetched-chunks-per-query`. #4260
6
7
*[ENHANCEMENT] Add timeout for waiting on compactor to become ACTIVE in the ring. #4262
f.Var(&cfg.EnabledTenants, "ruler.enabled-tenants", "Comma separated list of tenants whose rules this ruler can evaluate. If specified, only these tenants will be handled by ruler, otherwise this ruler can process rules from all tenants. Subject to sharding.")
174
176
f.Var(&cfg.DisabledTenants, "ruler.disabled-tenants", "Comma separated list of tenants whose rules this ruler cannot evaluate. If specified, a ruler that would normally pick the specified tenant(s) for processing will ignore them instead. Subject to sharding.")
175
177
178
+
f.BoolVar(&cfg.EnableQueryStats, "ruler.query-stats-enabled", false, "Report the wall time for ruler queries to complete as a per user metric and as an info level log message.")
0 commit comments