Add StartedQueries stat to InternalResourceGroup for tracking query start rate #23984
+54
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add a new
StartedQueries
stat toInternalResourceGroup
to track the rate of queries being started/submitted to a resource group. After #22957 we have nearly all of the useful operational stats that you would want to know about a resource group (like CPU / memory, queued/running queries at any given time, etc.), but one thing that is missing is an understanding of the rate at which queries are being submitted into this resource group.Additional context and related issues
Currently we have a metric
TimeBetweenStartsSec
but it doesn't meet the needs described here:CounterStat
, but is trying to measure timing information, so it really should be aTimeStat
. Currently it is putting timing information (count of seconds) into aCounterStat
which doesn't really produce meaningful data.Point (3) is fixable and I have a WIP to address it (xkrogen@c2d474d), but after working on it I have become convinced that even if fixed, it is confusing and not useful. I am more inclined to just remove it and entirely replace it with this new metric. Will be happy to do that as a follow-on to this PR if others agree, or if there is consensus that
TimeBetweenStartsSec
indeed adds significant value and it's worth fixing the issues described in (3), I can finish up my WIP changes.Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(X) Release notes are required, with the following suggested text: