Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsdb: add tenant-level store metrics to tsdb #99860

Merged
merged 1 commit into from
Apr 4, 2023

Commits on Apr 4, 2023

  1. tsdb: add tenant-level store metrics to tsdb

    Previously, while we had the ability to show tenant-level
    store metrics in the `/_status/vars` page, these metrics
    were never written to tsdb.
    
    This is despite the changes in cockroachdb#98077,
    which did a great job at writing all the metrics in the
    tenant-specific metric registries, but didn't pull the
    tenant-specific store metrics out of the store registries.
    This is because these metrics exist as *child* metrics on
    the store registry metrics, and we did not previously have
    logic to individually pick these metrics out of their
    parent AggGauge/Counter metrics.
    
    This patch adds the logic to do so. Now, for each tenant
    ID that exists in the recorder's `tenantRegistries` map,
    we will attempt to pick that tenant's individual child
    metric & values from all the metrics that exist in
    TenantsStorageMetrics. This will limit the writing
    of these tenant-level metrics to only happen in deployments
    where multiple tenants are running in-process, as environments
    such as serverless clusters are expected to have an empty
    `tenantRegistries` map in this recorder.
    
    Release note: none
    Alex Barganier authored and abarganier committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    4dd0304 View commit details
    Browse the repository at this point in the history