metrics: improve ux around _status/vars output#99516
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Mar 28, 2023
Merged
metrics: improve ux around _status/vars output#99516craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
aadityasondhi
approved these changes
Mar 27, 2023
Contributor
aadityasondhi
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @dhartunian)
pkg/server/status/recorder.go line 141 at r1 (raw file):
mu struct { syncutil.RWMutex sync.Once
this is cool!
34c0056 to
a529de1
Compare
Previously, the addition of the `tenant` metric label was applied uniformly and could result in confusion for customers who never enable multi-tenancy or c2c. The `tenant="system"` label carries little meaning when there's no tenancy in use. This change modifies the system tenant label application to only happen when a non- sytem in-process tenant is created. Additionally, an environment variable: `COCKROACH_DISABLE_NODE_AND_TENANT_METRIC_LABELS` can be set to `false` to disable the new `tenant` and `node_id` labels. This can be used on single-process tenants to disable the `tenant` label. When the `tenantNameContainer` is nil, or the `nodeID` is set to 0, the labels will not be applied during recorder configuration on startup. This is currently the case when running a separate process tenant using `mt start-sql`. Those tenants *will not* have `tenant` or `nodeID` labels available. Resolves: cockroachdb#94668 Epic: CRDB-18798 Release note (ops change): The `COCKROACH_DISABLE_NODE_AND_TENANT_METRIC_LABELS` env var can be used to disable the newly introduced metric labels in the `_status/vars` output if they conflict with a customer's scrape configuration.
a529de1 to
a6a1a4c
Compare
Collaborator
Author
|
bors r=aadityasondhi |
Contributor
|
Build succeeded: |
|
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. Backport to branch 23.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Previously, the addition of the
tenantmetric label was applied uniformly and could result in confusion for customers who never enable multi-tenancy or c2c. Thetenant="system"label carries little meaning when there's no tenancy in use.This change modifies the system tenant label application to only happen when a non- sytem in-process tenant is created.
Additionally, an environment variable:
COCKROACH_DISABLE_NODE_AND_TENANT_METRIC_LABELScan be set tofalseto disable the newtenantandnode_idlabels. This can be used on single-process tenants to disable thetenantlabel.Resolves: #94668
Epic: CRDB-18798
Release note (ops change): The
COCKROACH_DISABLE_NODE_AND_TENANT_METRIC_LABELSenv var can be used to disable the newly introduced metric labels in the_status/varsoutput if they conflict with a customer's scrape configuration.