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

Emit metric for labelsSizeBytes #6372

Closed
anna-tran opened this issue Nov 25, 2024 · 2 comments · Fixed by #6380
Closed

Emit metric for labelsSizeBytes #6372

anna-tran opened this issue Nov 25, 2024 · 2 comments · Fixed by #6380
Labels
type/feature type/observability To help know what is going on inside Cortex

Comments

@anna-tran
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Cortex provides a MaxLabelsSizeBytes limit for the max combined size in bytes of all labels and label values for a given metric name, but does not emit the metric this is compared to. Exposing such a metric would help users to know how close they are to hitting the limit in case they intend to add more labels to a metric name.

Describe the solution you'd like
Expose the labelSizeBytes as a native histogram metric that tenants can monitor.

@dosubot dosubot bot added type/feature type/observability To help know what is going on inside Cortex labels Nov 25, 2024
@danielblando
Copy link
Contributor

I like the proposal to add a metric for labelSizeBytes and allowing tenants to monitor it.

My only concern is how much it would be useful to track the exact metricName which the high labelSize is coming from.
Would you add a label for tenant and metricName? Having a metricName label even with native histogram can create a lot of data, no?

@anna-tran
Copy link
Contributor Author

I think we could just add the tenant but not the metric name. If the tenant exceeds the label size limit the error returned will include the entire label set so the tenant should be able to deduce the metric name from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature type/observability To help know what is going on inside Cortex
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants