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

[Custom threshold] Fix using data view runtime fields during rule execution for the custom threshold rule #209133

Conversation

maryam-saeidi
Copy link
Member

@maryam-saeidi maryam-saeidi commented Jan 31, 2025

Fixes #200772

🐉 Summary

This PR fixes supporting data view runtime fields during rule execution for the custom threshold rule.

🧪 How to test

  1. Create a runtime field as shown below:

    Runtime field Preview
    Image Image
  2. Make sure alerts are generated as expected both for regular and no-data alerts:
    image

TODO

  • Add an API integration test
    • Test on MKI

How to run the test

node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep="CARDINALITY - RUNTIME FIELD - FIRED"

@maryam-saeidi maryam-saeidi added release_note:fix backport:prev-major Backport to (8.x, 8.18, 8.17, 8.16) the previous major branch and other branches in development labels Jan 31, 2025
@maryam-saeidi maryam-saeidi self-assigned this Jan 31, 2025
@maryam-saeidi maryam-saeidi requested a review from a team as a code owner January 31, 2025 15:42
@botelastic botelastic bot added the Team:obs-ux-management Observability Management User Experience Team label Jan 31, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@maryam-saeidi maryam-saeidi added the bug Fixes for quality problems that affect the customer experience label Jan 31, 2025
@maryam-saeidi maryam-saeidi changed the title [Custom threshold] Fix supporting data view runtime fields during rule execution for the custom threshold rule [Custom threshold] Fix using data view runtime fields during rule execution for the custom threshold rule Jan 31, 2025
@maryam-saeidi maryam-saeidi requested a review from a team as a code owner January 31, 2025 16:43
Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

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

x-pack/test/api_integration/deployment_agnostic/services/data_view_api.ts changes LGTM

Copy link
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@doakalexi doakalexi left a comment

Choose a reason for hiding this comment

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

LGTM too, thank you!

@maryam-saeidi maryam-saeidi added the ci:project-deploy-observability Create an Observability project label Feb 3, 2025
Copy link
Contributor

github-actions bot commented Feb 3, 2025

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@maryam-saeidi maryam-saeidi added ci:project-deploy-observability Create an Observability project and removed ci:project-deploy-observability Create an Observability project labels Feb 3, 2025
Copy link
Contributor

github-actions bot commented Feb 3, 2025

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

elasticmachine commented Feb 3, 2025

💚 Build Succeeded

  • Buildkite Build
  • Commit: 337eaa5
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-209133-337eaa5e9d0d

Metrics [docs]

✅ unchanged

History

cc @maryam-saeidi

@maryam-saeidi maryam-saeidi enabled auto-merge (squash) February 3, 2025 10:57
@maryam-saeidi maryam-saeidi merged commit 8fe5738 into elastic:main Feb 3, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.17, 8.18, 8.x

https://github.com/elastic/kibana/actions/runs/13112145461

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 3, 2025
…cution for the custom threshold rule (elastic#209133)

Fixes elastic#200772

## 🐉  Summary

This PR fixes supporting data view runtime fields during rule execution
for the custom threshold rule.

## 🧪 How to test

1. Create a runtime field as shown below:

    |Runtime field| Preview|
    |---|---|

|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|

2. Make sure alerts are generated as expected both for regular and
no-data alerts:

![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)

### TODO
- [x] Add an API integration test
    - [x] Test on MKI

(cherry picked from commit 8fe5738)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 3, 2025
…cution for the custom threshold rule (elastic#209133)

Fixes elastic#200772

## 🐉  Summary

This PR fixes supporting data view runtime fields during rule execution
for the custom threshold rule.

## 🧪 How to test

1. Create a runtime field as shown below:

    |Runtime field| Preview|
    |---|---|

|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|

2. Make sure alerts are generated as expected both for regular and
no-data alerts:

![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)

### TODO
- [x] Add an API integration test
    - [x] Test on MKI

(cherry picked from commit 8fe5738)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.16 Backport failed because of merge conflicts
8.17 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.17:
- [SecuritySolution][Endpoint] Update request docs for isolate/release/processes (#209097)
8.18
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 209133

Questions ?

Please refer to the Backport tool documentation

@maryam-saeidi maryam-saeidi deleted the 200772-support-dataview-runtime-field branch February 3, 2025 11:28
maryam-saeidi added a commit to maryam-saeidi/kibana that referenced this pull request Feb 3, 2025
…cution for the custom threshold rule (elastic#209133)

Fixes elastic#200772

## 🐉  Summary

This PR fixes supporting data view runtime fields during rule execution
for the custom threshold rule.

## 🧪 How to test

1. Create a runtime field as shown below:

    |Runtime field| Preview|
    |---|---|

|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|

2. Make sure alerts are generated as expected both for regular and
no-data alerts:

![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)

### TODO
- [x] Add an API integration test
    - [x] Test on MKI

(cherry picked from commit 8fe5738)

# Conflicts:
#	x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/lib/is_populated_object.test.ts
#	x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/lib/is_populated_object.ts
@maryam-saeidi
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

maryam-saeidi added a commit to maryam-saeidi/kibana that referenced this pull request Feb 3, 2025
…cution for the custom threshold rule (elastic#209133)

Fixes elastic#200772

## 🐉  Summary

This PR fixes supporting data view runtime fields during rule execution
for the custom threshold rule.

## 🧪 How to test

1. Create a runtime field as shown below:

    |Runtime field| Preview|
    |---|---|

|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|

2. Make sure alerts are generated as expected both for regular and
no-data alerts:

![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)

### TODO
- [x] Add an API integration test
    - [x] Test on MKI

(cherry picked from commit 8fe5738)

# Conflicts:
#	x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/lib/is_populated_object.test.ts
#	x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/lib/is_populated_object.ts
#	x-pack/test/api_integration/deployment_agnostic/services/data_view_api.ts
#	x-pack/test_serverless/api_integration/test_suites/observability/custom_threshold_rule/cardinality_runtime_field_fired.ts
#	x-pack/test_serverless/api_integration/test_suites/observability/custom_threshold_rule/index.ts
@maryam-saeidi
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.16

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 4, 2025
…ule execution for the custom threshold rule (#209133) (#209253)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Custom threshold] Fix using data view runtime fields during rule
execution for the custom threshold rule
(#209133)](#209133)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Maryam
Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2025-02-03T11:09:29Z","message":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold rule (#209133)\n\nFixes #200772\r\n\r\n## 🐉
Summary\r\n\r\n\r\nThis PR fixes supporting data view runtime fields
during rule execution\r\nfor the custom threshold rule.\r\n\r\n## 🧪 How
to test\r\n\r\n1. Create a runtime field as shown below:\r\n\r\n
|Runtime field| Preview|\r\n
|---|---|\r\n\r\n|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|\r\n\r\n2.
Make sure alerts are generated as expected both for regular
and\r\nno-data
alerts:\r\n\r\n![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)\r\n\r\n###
TODO\r\n- [x] Add an API integration test\r\n - [x] Test on
MKI","sha":"8fe5738b24048972f801dc96e243d5a3d5d72eb3","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-management","v9.1.0"],"title":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold
rule","number":209133,"url":"https://github.com/elastic/kibana/pull/209133","mergeCommit":{"message":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold rule (#209133)\n\nFixes #200772\r\n\r\n## 🐉
Summary\r\n\r\n\r\nThis PR fixes supporting data view runtime fields
during rule execution\r\nfor the custom threshold rule.\r\n\r\n## 🧪 How
to test\r\n\r\n1. Create a runtime field as shown below:\r\n\r\n
|Runtime field| Preview|\r\n
|---|---|\r\n\r\n|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|\r\n\r\n2.
Make sure alerts are generated as expected both for regular
and\r\nno-data
alerts:\r\n\r\n![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)\r\n\r\n###
TODO\r\n- [x] Add an API integration test\r\n - [x] Test on
MKI","sha":"8fe5738b24048972f801dc96e243d5a3d5d72eb3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209133","number":209133,"mergeCommit":{"message":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold rule (#209133)\n\nFixes #200772\r\n\r\n## 🐉
Summary\r\n\r\n\r\nThis PR fixes supporting data view runtime fields
during rule execution\r\nfor the custom threshold rule.\r\n\r\n## 🧪 How
to test\r\n\r\n1. Create a runtime field as shown below:\r\n\r\n
|Runtime field| Preview|\r\n
|---|---|\r\n\r\n|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|\r\n\r\n2.
Make sure alerts are generated as expected both for regular
and\r\nno-data
alerts:\r\n\r\n![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)\r\n\r\n###
TODO\r\n- [x] Add an API integration test\r\n - [x] Test on
MKI","sha":"8fe5738b24048972f801dc96e243d5a3d5d72eb3"}}]}] BACKPORT-->

---------

Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
kibanamachine added a commit that referenced this pull request Feb 4, 2025
…le execution for the custom threshold rule (#209133) (#209254)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Custom threshold] Fix using data view runtime fields during rule
execution for the custom threshold rule
(#209133)](#209133)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Maryam
Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2025-02-03T11:09:29Z","message":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold rule (#209133)\n\nFixes #200772\r\n\r\n## 🐉
Summary\r\n\r\n\r\nThis PR fixes supporting data view runtime fields
during rule execution\r\nfor the custom threshold rule.\r\n\r\n## 🧪 How
to test\r\n\r\n1. Create a runtime field as shown below:\r\n\r\n
|Runtime field| Preview|\r\n
|---|---|\r\n\r\n|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|\r\n\r\n2.
Make sure alerts are generated as expected both for regular
and\r\nno-data
alerts:\r\n\r\n![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)\r\n\r\n###
TODO\r\n- [x] Add an API integration test\r\n - [x] Test on
MKI","sha":"8fe5738b24048972f801dc96e243d5a3d5d72eb3","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-management","v9.1.0"],"title":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold
rule","number":209133,"url":"https://github.com/elastic/kibana/pull/209133","mergeCommit":{"message":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold rule (#209133)\n\nFixes #200772\r\n\r\n## 🐉
Summary\r\n\r\n\r\nThis PR fixes supporting data view runtime fields
during rule execution\r\nfor the custom threshold rule.\r\n\r\n## 🧪 How
to test\r\n\r\n1. Create a runtime field as shown below:\r\n\r\n
|Runtime field| Preview|\r\n
|---|---|\r\n\r\n|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|\r\n\r\n2.
Make sure alerts are generated as expected both for regular
and\r\nno-data
alerts:\r\n\r\n![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)\r\n\r\n###
TODO\r\n- [x] Add an API integration test\r\n - [x] Test on
MKI","sha":"8fe5738b24048972f801dc96e243d5a3d5d72eb3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209133","number":209133,"mergeCommit":{"message":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold rule (#209133)\n\nFixes #200772\r\n\r\n## 🐉
Summary\r\n\r\n\r\nThis PR fixes supporting data view runtime fields
during rule execution\r\nfor the custom threshold rule.\r\n\r\n## 🧪 How
to test\r\n\r\n1. Create a runtime field as shown below:\r\n\r\n
|Runtime field| Preview|\r\n
|---|---|\r\n\r\n|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|\r\n\r\n2.
Make sure alerts are generated as expected both for regular
and\r\nno-data
alerts:\r\n\r\n![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)\r\n\r\n###
TODO\r\n- [x] Add an API integration test\r\n - [x] Test on
MKI","sha":"8fe5738b24048972f801dc96e243d5a3d5d72eb3"}}]}] BACKPORT-->

---------

Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
maryam-saeidi added a commit that referenced this pull request Feb 4, 2025
…ule execution for the custom threshold rule (#209133) (#209280)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Custom threshold] Fix using data view runtime fields during rule
execution for the custom threshold rule
(#209133)](#209133)

<!--- Backport version: 9.6.4 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Maryam
Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2025-02-03T11:09:29Z","message":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold rule (#209133)\n\nFixes #200772\r\n\r\n## 🐉
Summary\r\n\r\n\r\nThis PR fixes supporting data view runtime fields
during rule execution\r\nfor the custom threshold rule.\r\n\r\n## 🧪 How
to test\r\n\r\n1. Create a runtime field as shown below:\r\n\r\n
|Runtime field| Preview|\r\n
|---|---|\r\n\r\n|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|\r\n\r\n2.
Make sure alerts are generated as expected both for regular
and\r\nno-data
alerts:\r\n\r\n![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)\r\n\r\n###
TODO\r\n- [x] Add an API integration test\r\n - [x] Test on
MKI","sha":"8fe5738b24048972f801dc96e243d5a3d5d72eb3","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-management","v9.1.0"],"title":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold
rule","number":209133,"url":"https://github.com/elastic/kibana/pull/209133","mergeCommit":{"message":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold rule (#209133)\n\nFixes #200772\r\n\r\n## 🐉
Summary\r\n\r\n\r\nThis PR fixes supporting data view runtime fields
during rule execution\r\nfor the custom threshold rule.\r\n\r\n## 🧪 How
to test\r\n\r\n1. Create a runtime field as shown below:\r\n\r\n
|Runtime field| Preview|\r\n
|---|---|\r\n\r\n|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|\r\n\r\n2.
Make sure alerts are generated as expected both for regular
and\r\nno-data
alerts:\r\n\r\n![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)\r\n\r\n###
TODO\r\n- [x] Add an API integration test\r\n - [x] Test on
MKI","sha":"8fe5738b24048972f801dc96e243d5a3d5d72eb3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209133","number":209133,"mergeCommit":{"message":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold rule (#209133)\n\nFixes #200772\r\n\r\n## 🐉
Summary\r\n\r\n\r\nThis PR fixes supporting data view runtime fields
during rule execution\r\nfor the custom threshold rule.\r\n\r\n## 🧪 How
to test\r\n\r\n1. Create a runtime field as shown below:\r\n\r\n
|Runtime field| Preview|\r\n
|---|---|\r\n\r\n|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|\r\n\r\n2.
Make sure alerts are generated as expected both for regular
and\r\nno-data
alerts:\r\n\r\n![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)\r\n\r\n###
TODO\r\n- [x] Add an API integration test\r\n - [x] Test on
MKI","sha":"8fe5738b24048972f801dc96e243d5a3d5d72eb3"}},{"url":"https://github.com/elastic/kibana/pull/209253","number":209253,"branch":"8.18","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/209254","number":209254,"branch":"8.x","state":"OPEN"}]}]
BACKPORT-->
maryam-saeidi added a commit that referenced this pull request Feb 4, 2025
…ule execution for the custom threshold rule (#209133) (#209287)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Custom threshold] Fix using data view runtime fields during rule
execution for the custom threshold rule
(#209133)](#209133)

<!--- Backport version: 9.6.4 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Maryam
Saeidi","email":"maryam.saeidi@elastic.co"},"sourceCommit":{"committedDate":"2025-02-03T11:09:29Z","message":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold rule (#209133)\n\nFixes #200772\r\n\r\n## 🐉
Summary\r\n\r\n\r\nThis PR fixes supporting data view runtime fields
during rule execution\r\nfor the custom threshold rule.\r\n\r\n## 🧪 How
to test\r\n\r\n1. Create a runtime field as shown below:\r\n\r\n
|Runtime field| Preview|\r\n
|---|---|\r\n\r\n|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|\r\n\r\n2.
Make sure alerts are generated as expected both for regular
and\r\nno-data
alerts:\r\n\r\n![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)\r\n\r\n###
TODO\r\n- [x] Add an API integration test\r\n - [x] Test on
MKI","sha":"8fe5738b24048972f801dc96e243d5a3d5d72eb3","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-management","v9.1.0"],"title":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold
rule","number":209133,"url":"https://github.com/elastic/kibana/pull/209133","mergeCommit":{"message":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold rule (#209133)\n\nFixes #200772\r\n\r\n## 🐉
Summary\r\n\r\n\r\nThis PR fixes supporting data view runtime fields
during rule execution\r\nfor the custom threshold rule.\r\n\r\n## 🧪 How
to test\r\n\r\n1. Create a runtime field as shown below:\r\n\r\n
|Runtime field| Preview|\r\n
|---|---|\r\n\r\n|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|\r\n\r\n2.
Make sure alerts are generated as expected both for regular
and\r\nno-data
alerts:\r\n\r\n![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)\r\n\r\n###
TODO\r\n- [x] Add an API integration test\r\n - [x] Test on
MKI","sha":"8fe5738b24048972f801dc96e243d5a3d5d72eb3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209133","number":209133,"mergeCommit":{"message":"[Custom
threshold] Fix using data view runtime fields during rule execution for
the custom threshold rule (#209133)\n\nFixes #200772\r\n\r\n## 🐉
Summary\r\n\r\n\r\nThis PR fixes supporting data view runtime fields
during rule execution\r\nfor the custom threshold rule.\r\n\r\n## 🧪 How
to test\r\n\r\n1. Create a runtime field as shown below:\r\n\r\n
|Runtime field| Preview|\r\n
|---|---|\r\n\r\n|![Image](https://github.com/user-attachments/assets/09fc0754-8944-486e-bf85-10b3f3464d17)|![Image](https://github.com/user-attachments/assets/e93efad5-bc3b-4306-b820-8b096dbba360)|\r\n\r\n2.
Make sure alerts are generated as expected both for regular
and\r\nno-data
alerts:\r\n\r\n![image](https://github.com/user-attachments/assets/a2174e40-11a4-4d75-8500-bfce126ba7cd)\r\n\r\n###
TODO\r\n- [x] Add an API integration test\r\n - [x] Test on
MKI","sha":"8fe5738b24048972f801dc96e243d5a3d5d72eb3"}},{"url":"https://github.com/elastic/kibana/pull/209253","number":209253,"branch":"8.18","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/209254","number":209254,"branch":"8.x","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/209280","number":209280,"branch":"8.17","state":"OPEN"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.18, 8.17, 8.16) the previous major branch and other branches in development bug Fixes for quality problems that affect the customer experience ci:project-deploy-observability Create an Observability project release_note:fix Team:obs-ux-management Observability Management User Experience Team v8.16.4 v8.17.2 v8.18.0 v8.19.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Custom threshold] Add support for data view runtime fields
6 participants