-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/sql: export sql.aggregated_livebytes metric for out-of-process te…
…nants Previously, in order to obtain livebytes metrics for tenants, one would need to query such values via the KV servers, and this can be problematic if we only have access to just the SQL servers. For example, in CockroachDB Cloud, only metrics from the SQL servers are exported to end-users, and is done so directly from the cockroachdb process. It is not trivial to export an additional subset of metrics from the KV servers filtered by tenant ID. To address that, this commit exposes livebytes for tenants directly via an aggregated metric on the SQL nodes. The aggregated metric will be updated every 60 seconds by default, and will be exported via the existing MVCC statistics update job. Unlike other job metrics where metrics are registered at initialization time and stays forever, this aggregated metric is tied to the lifespan of the job (i.e. it is only exported if the job is running, and unexported otherwise). This feature is scoped to standalone SQL servers only, which at this point of writing, is only supported in CockroachDB Cloud. If we wanted to backport this into 23.2, it should be straightforward as well since the permanent upgrade to insert the job is already in release-23.2. Fixes: #119139 Epic: none Release note (sql change): Out-of-process SQL servers will start exporting a new sql.aggregated_livebytes metric. This metric gets updated once every 60 seconds by default, and its update interval can be configured via the `tenant_global_metrics_exporter_interval` cluster setting.
- Loading branch information
1 parent
25f20a9
commit 7260245
Showing
7 changed files
with
425 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.