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

[Observability] [Inventory/Metric/Custom threshold] Specify fields instead of '*' in fieldCaps #184909

Closed
benakansara opened this issue Jun 6, 2024 · 1 comment · Fixed by #184968
Assignees
Labels
Feature:Alerting Team:obs-ux-management Observability Management User Experience Team

Comments

@benakansara
Copy link
Contributor

Related to #184441

We are using fieldCaps API with fields: '*' which leads to increased traffic. We can significantly reduce this traffic by requesting only the fields needed for rule execution instead of all fields.

Files where this change should be made.

x-pack/plugins/observability_solution/infra/server/lib/alerting/common/utils.ts:199
x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/utils.ts:133

Currently we are only checking if container.id exists in the index. We should specify this field in fieldCaps request instead of requesting all fields with *.

@benakansara benakansara added Feature:Alerting Team:obs-ux-management Observability Management User Experience Team labels Jun 6, 2024
@benakansara benakansara self-assigned this Jun 6, 2024
@elasticmachine
Copy link
Contributor

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

benakansara added a commit that referenced this issue Jun 7, 2024
benakansara added a commit to benakansara/kibana that referenced this issue Jun 7, 2024
benakansara referenced this issue Jun 7, 2024
…'*' in fieldCaps request (#184968) (#185010)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[Inventory/Metric/Custom threshold] Specify fields instead of '*' in
fieldCaps request
(#184968)](#184968)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Bena
Kansara","email":"69037875+benakansara@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-06-07T13:39:37Z","message":"[Inventory/Metric/Custom
threshold] Specify fields instead of '*' in fieldCaps request
(#184968)\n\nResolves
https://github.com/elastic/kibana/issues/184909","sha":"00153fd70fbc927f9f8eb5920a0590c8e5116f18","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","ci:project-deploy-observability","Team:obs-ux-management","v8.15.0","v8.14.1"],"number":184968,"url":"https://github.com/elastic/kibana/pull/184968","mergeCommit":{"message":"[Inventory/Metric/Custom
threshold] Specify fields instead of '*' in fieldCaps request
(#184968)\n\nResolves
https://github.com/elastic/kibana/issues/184909","sha":"00153fd70fbc927f9f8eb5920a0590c8e5116f18"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/184968","number":184968,"mergeCommit":{"message":"[Inventory/Metric/Custom
threshold] Specify fields instead of '*' in fieldCaps request
(#184968)\n\nResolves
https://github.com/elastic/kibana/issues/184909","sha":"00153fd70fbc927f9f8eb5920a0590c8e5116f18"}},{"branch":"8.14","label":"v8.14.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Team:obs-ux-management Observability Management User Experience Team
Projects
None yet
2 participants