-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
98077: ts: add support for multitenant timeseries metrics r=aadityasondhi a=aadityasondhi This patch allows tsdb to support tenant-sperated timeseries metrics. The changes can be summarized as: (1) Changes in the write path: In `pkg/status` we now store metrics corresponding to non-system tenants with their tenant IDs. This makes the `source` component of the ts key includes both node IDs and tenant IDs: ``` .../[NodeID]-[TenantID] ``` Note: the system tenant does not include the tenant ID to allow for backwards compatibility. (2) Changes in the query path: (2.1) as system tenant: If the request to ts server comes annotated as system tenant, we aggregate timeseries across all tenants in that metric name's keyspace. (2.2) as secondary tenant: When a secondary tenant queries the server, it is routed through tenant connect and checked for having tenant capabilites for viewing tsdb data. During this stage that request is annotated with the Tenant ID. When the system tenant ts server recevies this query with a Tenant ID set: - If no sources are requested as part of the query, it will aggregate across all sources that match the tenant ID. - If specific sources are specified along with the tenant ID, it will scan the keyspace for the NodeID and then filter out results that do not match with the TenantID. These changes ensure that the system tenant is able to have a view of metrics across all tenants and application tenants have access to their own metrics. These changes are all done entirely server-side so no client changes are needed. The client will be automatically served the timeseries data it has access to based on its tenant capability. Fixes: #96438. Release note (ui change): Timeseries metrics in db concole will show tenant-specific metrics. For the system tenant, these timeseries will be aggregated across all tenants. For a secondary tenant, only metrics belonging to that particular tenant will be shown. 98815: server, ui: add sort and limit to sql activity pages, switch sql activity pages to read only from system table r=maryliag a=xinhaoz See individual commits. DB-Console: https://www.loom.com/share/73248244baa54cdf80389d0eec788447 DB-Console Details pages: https://www.loom.com/share/2d74c6cf082f4dcfb5e7f690166c2baf Co-authored-by: Aaditya Sondhi <[email protected]> Co-authored-by: Xin Hao Zhang <[email protected]> Co-authored-by: maryliag <[email protected]>
- Loading branch information
Showing
83 changed files
with
2,207 additions
and
590 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
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.