pkg/sql/sqlstats: rework SQL stats flush metrics #120709
Merged
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.
Informs: #119779
Epic: CRDB-24527
This patch renames a few of the core metrics used to track the SQL stats
flush job to be more in-line with how the SQL activity update job's
metrics work.
Primarily, it renames them for consistency. It also changes the general
count
metric to only track successful executions, so we can moreeasily discern between failed and successful executions.
Release note (ops change): Metrics used to track the SQL stats
subsystem's task that flushes in-memory stats to persisted storage have
been reworked slightly to be more consistent with other metrics used in
the subsystem. The metrics are:
sql.stats.flushes.successful
: Number of times SQL Stats are flushedsuccessfully to persistent storage
sql.stats.flushes.failed
: Number of attempted SQL Stats flushes thatfailed with errors
sql.stats.flush.latency
: The latency of SQL Stats flushes topersistent storage. Includes failed flush attempts