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

[v9.5.x] Alerting: Convert 'Both' type Prometheus queries to 'Range' in migration #70907

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

JacobsonMT
Copy link
Member

Backport 00d5f7f from #70781


What is this feature?

This feature updates the legacy migration to convert Prometheus queries of type Both to type Range and log a warning during migration.

Why do we need this feature?

Legacy supports alerting on Prometheus queries of type Both. This returns a mixed response with two dataframes (TimeSeriesWide & NumericWide), however Server Side Expressions and UA does not currently support this type of mixed response.

Who is this feature for?

Users of legacy alerting who will be migrating to UA.

Which issue(s) does this PR fix?:

Fixes #70768

Special notes for your reviewer:

There is the possibility to better support migrating this functionality by:

  • Splitting the query into two: one for instant and one for range.
  • Splitting the condition into two: one for each query, separated by OR.

However, relying on a Both query instead of multiple conditions to do this in legacy is likely
to be unintentional. In addition, this would require more robust operator precedence in classic conditions.
Given these reasons, we opt to convert them to Range queries and log a warning.

Please check that:

…ion (#70781)

* Alerting: Convert 'Both' type Prometheus queries to 'Range' in migration

(cherry picked from commit 00d5f7f)
@JacobsonMT JacobsonMT merged commit 2745d3b into v9.5.x Jun 29, 2023
19 checks passed
@JacobsonMT JacobsonMT deleted the backport-70781-to-v9.5.x branch June 29, 2023 15:33
@zerok zerok modified the milestones: 9.5.x, 9.5.6 Jun 30, 2023
@zerok zerok modified the milestones: 9.5.6, 9.5.x, 9.5.7 Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants