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

Prometheus: Remove < and > from Query Builder Label Matcher operations #83981

Merged
merged 1 commit into from Mar 6, 2024

Conversation

kylebrandt
Copy link
Contributor

What is this feature?

Before:

image showing invalid less than and greater than operators in label matchers

After:

image with those matchers no longer in the builder

Why do we need this feature?

PromQL doesn't support < or > (see prometheus/prometheus issue) for label matchers, so the builder should not be showing them in the UI as options.

Copy link
Contributor

@svennergr svennergr left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @kylebrandt!

@kylebrandt kylebrandt changed the title Prometheus: (QueryBuiler) Remove < and > from Label Matcher operations Prometheus: Remove < and > from Query Builder Label Matcher operations Mar 6, 2024
@kylebrandt kylebrandt merged commit 0929bf7 into main Mar 6, 2024
36 checks passed
@kylebrandt kylebrandt deleted the rmPromGTLTLabelMatcherOperators branch March 6, 2024 14:57
@snackycracky
Copy link

snackycracky commented Apr 11, 2024

I was so confused by these operators because I was looking for a way to convert labels to integers for fibonacci labeled buckets.
I wanted to create an alert for the usecase: "durations outside of specific bucket range 10 > x < 20 .... " but then it turns out that this is the wrong way. Also Regex is bad to define a range of labels for integers ....

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

Successfully merging this pull request may close these issues.

None yet

4 participants