[Alerting] Add snapshot telemetry for _ignored fields#221480
[Alerting] Add snapshot telemetry for _ignored fields#221480maryam-saeidi merged 12 commits intoelastic:mainfrom
Conversation
|
/ci |
|
/ci |
x-pack/platform/plugins/shared/alerting/server/usage/task_state.ts
Outdated
Show resolved
Hide resolved
x-pack/platform/plugins/shared/alerting/server/usage/lib/get_telemetry_from_alerts.ts
Show resolved
Hide resolved
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/15304969318 |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
|
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
Closes elastic#220815 ## Summary This PR adds telemetry for _ignored fields. The goal is to have an alert based on this field and get notified in case a user hits the mapping limit, but by default, we don't expect this to happen. This PR adds `count_ignored_fields_by_rule_type` field that counts the number of _ignored fields per rule type. In the future, we can extend the telemetry data to also include the actual number of mappings over the limit (there is a [feature request](elastic/elasticsearch#68947) for adding field count information to index API) ### How to test - Add a lot of dynamic fields as mentioned here: elastic#216719 - Create a rule with a custom threshold rule with multiple group by fields to generate an alert with _ignored field - Run the following API and check the value of `count_ignored_fields_by_rule_type` ``` POST kbn:/internal/telemetry/clusters/_stats?apiVersion=2 { "unencrypted": true, "refreshCache": true } ``` <details> <summary> Here is what it looks like:</summary>   </details> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Closes elastic#220815 ## Summary This PR adds telemetry for _ignored fields. The goal is to have an alert based on this field and get notified in case a user hits the mapping limit, but by default, we don't expect this to happen. This PR adds `count_ignored_fields_by_rule_type` field that counts the number of _ignored fields per rule type. In the future, we can extend the telemetry data to also include the actual number of mappings over the limit (there is a [feature request](elastic/elasticsearch#68947) for adding field count information to index API) ### How to test - Add a lot of dynamic fields as mentioned here: elastic#216719 - Create a rule with a custom threshold rule with multiple group by fields to generate an alert with _ignored field - Run the following API and check the value of `count_ignored_fields_by_rule_type` ``` POST kbn:/internal/telemetry/clusters/_stats?apiVersion=2 { "unencrypted": true, "refreshCache": true } ``` <details> <summary> Here is what it looks like:</summary>   </details> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit cde7a86) # Conflicts: # x-pack/platform/plugins/shared/alerting/server/usage/lib/get_telemetry_from_alerts.test.ts
|
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
#222150) # Backport This will backport the following commits from `main` to `8.19`: - [[Alerting] Add snapshot telemetry for _ignored fields (#221480)](#221480) <!--- Backport version: 9.6.6 --> ### 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-05-28T16:02:33Z","message":"[Alerting] Add snapshot telemetry for _ignored fields (#221480)\n\nCloses https://github.com/elastic/kibana/issues/220815\n\n## Summary\n\nThis PR adds telemetry for _ignored fields. The goal is to have an alert\nbased on this field and get notified in case a user hits the mapping\nlimit, but by default, we don't expect this to happen.\n\nThis PR adds `count_ignored_fields_by_rule_type` field that counts the\nnumber of _ignored fields per rule type.\n\nIn the future, we can extend the telemetry data to also include the\nactual number of mappings over the limit (there is a [feature\nrequest](elastic/elasticsearch#68947) for\nadding field count information to index API)\n\n### How to test\n\n- Add a lot of dynamic fields as mentioned here:\nhttps://github.com//pull/216719\n- Create a rule with a custom threshold rule with multiple group by\nfields to generate an alert with _ignored field\n- Run the following API and check the value of\n`count_ignored_fields_by_rule_type`\n ```\n POST kbn:/internal/telemetry/clusters/_stats?apiVersion=2\n {\n \"unencrypted\": true,\n \"refreshCache\": true\n }\n ```\n\n<details>\n<summary> Here is what it looks like:</summary>\n\n\n\n\n\n\n\n\n</details>\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"cde7a86287956467fffe4346a14a7fd24b99ff93","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport missing","backport:version","v9.1.0","v8.19.0","author:obs-ux-management"],"title":"[Alerting] Add snapshot telemetry for _ignored fields","number":221480,"url":"https://github.com/elastic/kibana/pull/221480","mergeCommit":{"message":"[Alerting] Add snapshot telemetry for _ignored fields (#221480)\n\nCloses https://github.com/elastic/kibana/issues/220815\n\n## Summary\n\nThis PR adds telemetry for _ignored fields. The goal is to have an alert\nbased on this field and get notified in case a user hits the mapping\nlimit, but by default, we don't expect this to happen.\n\nThis PR adds `count_ignored_fields_by_rule_type` field that counts the\nnumber of _ignored fields per rule type.\n\nIn the future, we can extend the telemetry data to also include the\nactual number of mappings over the limit (there is a [feature\nrequest](elastic/elasticsearch#68947) for\nadding field count information to index API)\n\n### How to test\n\n- Add a lot of dynamic fields as mentioned here:\nhttps://github.com//pull/216719\n- Create a rule with a custom threshold rule with multiple group by\nfields to generate an alert with _ignored field\n- Run the following API and check the value of\n`count_ignored_fields_by_rule_type`\n ```\n POST kbn:/internal/telemetry/clusters/_stats?apiVersion=2\n {\n \"unencrypted\": true,\n \"refreshCache\": true\n }\n ```\n\n<details>\n<summary> Here is what it looks like:</summary>\n\n\n\n\n\n\n\n\n</details>\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"cde7a86287956467fffe4346a14a7fd24b99ff93"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221480","number":221480,"mergeCommit":{"message":"[Alerting] Add snapshot telemetry for _ignored fields (#221480)\n\nCloses https://github.com/elastic/kibana/issues/220815\n\n## Summary\n\nThis PR adds telemetry for _ignored fields. The goal is to have an alert\nbased on this field and get notified in case a user hits the mapping\nlimit, but by default, we don't expect this to happen.\n\nThis PR adds `count_ignored_fields_by_rule_type` field that counts the\nnumber of _ignored fields per rule type.\n\nIn the future, we can extend the telemetry data to also include the\nactual number of mappings over the limit (there is a [feature\nrequest](elastic/elasticsearch#68947) for\nadding field count information to index API)\n\n### How to test\n\n- Add a lot of dynamic fields as mentioned here:\nhttps://github.com//pull/216719\n- Create a rule with a custom threshold rule with multiple group by\nfields to generate an alert with _ignored field\n- Run the following API and check the value of\n`count_ignored_fields_by_rule_type`\n ```\n POST kbn:/internal/telemetry/clusters/_stats?apiVersion=2\n {\n \"unencrypted\": true,\n \"refreshCache\": true\n }\n ```\n\n<details>\n<summary> Here is what it looks like:</summary>\n\n\n\n\n\n\n\n\n</details>\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"cde7a86287956467fffe4346a14a7fd24b99ff93"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
Closes elastic#220815 ## Summary This PR adds telemetry for _ignored fields. The goal is to have an alert based on this field and get notified in case a user hits the mapping limit, but by default, we don't expect this to happen. This PR adds `count_ignored_fields_by_rule_type` field that counts the number of _ignored fields per rule type. In the future, we can extend the telemetry data to also include the actual number of mappings over the limit (there is a [feature request](elastic/elasticsearch#68947) for adding field count information to index API) ### How to test - Add a lot of dynamic fields as mentioned here: elastic#216719 - Create a rule with a custom threshold rule with multiple group by fields to generate an alert with _ignored field - Run the following API and check the value of `count_ignored_fields_by_rule_type` ``` POST kbn:/internal/telemetry/clusters/_stats?apiVersion=2 { "unencrypted": true, "refreshCache": true } ``` <details> <summary> Here is what it looks like:</summary>   </details> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes elastic#220815 ## Summary This PR adds telemetry for _ignored fields. The goal is to have an alert based on this field and get notified in case a user hits the mapping limit, but by default, we don't expect this to happen. This PR adds `count_ignored_fields_by_rule_type` field that counts the number of _ignored fields per rule type. In the future, we can extend the telemetry data to also include the actual number of mappings over the limit (there is a [feature request](elastic/elasticsearch#68947) for adding field count information to index API) ### How to test - Add a lot of dynamic fields as mentioned here: elastic#216719 - Create a rule with a custom threshold rule with multiple group by fields to generate an alert with _ignored field - Run the following API and check the value of `count_ignored_fields_by_rule_type` ``` POST kbn:/internal/telemetry/clusters/_stats?apiVersion=2 { "unencrypted": true, "refreshCache": true } ``` <details> <summary> Here is what it looks like:</summary>   </details> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes #220815
Summary
This PR adds telemetry for _ignored fields. The goal is to have an alert based on this field and get notified in case a user hits the mapping limit, but by default, we don't expect this to happen.
This PR adds
count_ignored_fields_by_rule_typefield that counts the number of _ignored fields per rule type.In the future, we can extend the telemetry data to also include the actual number of mappings over the limit (there is a feature request for adding field count information to index API)
How to test
count_ignored_fields_by_rule_typeHere is what it looks like: