Skip to content

chore: Update prometheus to version v3. #4094

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simonswine
Copy link
Contributor

@simonswine simonswine commented Apr 10, 2025

Note this is change of behaviour as it will relax the label validation and allow the newer metric selectors format, which in turn needs to be used to use the full character set.

There is also some bigger impact to the remote write/metrics export, as there is a new version of remote write in prometheus v3: https://prometheus.io/docs/specs/prw/remote_write_spec_2_0/

This will be the new label selector format:

{"metric.name", "my.label.name"="bar"}

In order to override other validation at a later point, we also need to set:

import "github.com/prometheus/common/model"

func init() {
    model.NameValidationScheme = model.UTF8Validation
}

I am not planning to do this as part of this PR.

Note this will relax the label validation and allow the newer metric selectors
format to allow utf8 symbols.
Copy link
Contributor

@marcsanmi marcsanmi left a comment

Choose a reason for hiding this comment

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

LGTM 👍

We need to update prometheus testutils that has changed and some tests that now with a more relaxed label validation might expect or fail with different results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants