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

Add label size bytes native histogram #6380

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

anna-tran
Copy link
Contributor

What this PR does:
Exposes a new native histogram metric cortex_label_size_bytes to allow tenants to monitor how close they are to hitting the label size limit.

Which issue(s) this PR fixes:
Fixes #6372

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@dosubot dosubot bot added the type/observability To help know what is going on inside Cortex label Nov 27, 2024
@danielblando
Copy link
Contributor

Lets also update here

func DeletePerUserValidationMetrics(validateMetrics *ValidateMetrics, userID string, log log.Logger) {

Copy link
Contributor

@danielblando danielblando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 28, 2024
@friedrichg friedrichg merged commit e9d2ed7 into cortexproject:master Nov 28, 2024
16 checks passed
@@ -120,11 +121,21 @@ func NewValidateMetrics(r prometheus.Registerer) *ValidateMetrics {
[]string{"user"},
)
registerCollector(r, histogramSamplesReducedResolution)
labelSizeBytes := prometheus.NewHistogramVec(prometheus.HistogramOpts{
Name: "cortex_label_size_bytes",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we call it cortex_series_label_size_bytes? cortex_label_size_bytes makes me confused that this metric is for a single label not combined label size total

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size/S type/observability To help know what is going on inside Cortex
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emit metric for labelsSizeBytes
4 participants