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

[Fields Metadata] Improve integration fields resolution and caching #195405

Merged

Conversation

tonyghiani
Copy link
Contributor

@tonyghiani tonyghiani commented Oct 8, 2024

📓 Summary

Browsing fields from the Discover sidebar, I noticed integration fields never show a related description even if they exist. The same is happening in the fields table for the document detail flyout.

This happens due to integration and dataset parameters not being passed to the service.

Screen.Recording.2024-10-08.at.14.59.13.mov

These changes improve the resolution of the integration field metadata:

  • The integration and dataset params are no longer required to attempt resolving and integration field metadata.
    They are still accepted as an explicit hint in case we cannot infer correctly some integration packages from the field name.
  • The above change enables querying fields from different integrations and datasets at once, enabling metadata retrieval for mixed data sources.
  • The integration retrieved from the EPR is now cached with its relevant version, solving a potential corner case as explained here.
Screen.Recording.2024-10-08.at.15.09.14.mov

@tonyghiani tonyghiani added release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team:obs-ux-logs Observability Logs User Experience Team labels Oct 8, 2024
@tonyghiani tonyghiani requested review from a team as code owners October 8, 2024 13:11
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Oct 8, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Contributor

@criamico criamico left a comment

Choose a reason for hiding this comment

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

Fleet code LGTM

@tonyghiani
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

There are no new commits on the base branch.

@mohamedhamed-ahmed mohamedhamed-ahmed self-requested a review October 14, 2024 08:21
Copy link
Contributor

@mohamedhamed-ahmed mohamedhamed-ahmed left a comment

Choose a reason for hiding this comment

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

LGTM!

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fieldsMetadata 42 44 +2

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
fieldsMetadata 7 9 +2
Unknown metric groups

API count

id before after diff
fieldsMetadata 42 44 +2

History

@tonyghiani tonyghiani merged commit 2b7c72c into elastic:main Oct 14, 2024
26 checks passed
@tonyghiani tonyghiani deleted the feature/fields_metadata_improvements branch October 14, 2024 10:15
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 14, 2024
…lastic#195405)

## 📓 Summary

Browsing fields from the Discover sidebar, I noticed integration fields
never show a related description even if they exist. The same is
happening in the fields table for the document detail flyout.

This happens due to `integration` and `dataset` parameters not being
passed to the service.

https://github.com/user-attachments/assets/0946cc71-44fb-4fc7-8e9d-b146bdd811f2

These changes improve the resolution of the integration field metadata:

- The `integration` and `dataset` params are no longer required to
attempt resolving and integration field metadata.
They are still accepted as an explicit hint in case we cannot infer
correctly some integration packages from the field name.
- The above change enables querying fields from different integrations
and datasets at once, enabling metadata retrieval for mixed data
sources.
- The integration retrieved from the EPR is now cached with its relevant
version, solving a potential corner case as explained
[here](elastic#183806 (review)).

https://github.com/user-attachments/assets/ae9cafd8-2581-4ce0-9242-cbb4e37c7702

---------

Co-authored-by: Marco Antonio Ghiani <[email protected]>
(cherry picked from commit 2b7c72c)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

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 Oct 14, 2024
…hing (#195405) (#196086)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Fields Metadata] Improve integration fields resolution and caching
(#195405)](#195405)

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

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

<!--BACKPORT [{"author":{"name":"Marco Antonio
Ghiani","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-14T10:15:36Z","message":"[Fields
Metadata] Improve integration fields resolution and caching
(#195405)\n\n## 📓 Summary\r\n\r\nBrowsing fields from the Discover
sidebar, I noticed integration fields\r\nnever show a related
description even if they exist. The same is\r\nhappening in the fields
table for the document detail flyout.\r\n\r\nThis happens due to
`integration` and `dataset` parameters not being\r\npassed to the
service.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/0946cc71-44fb-4fc7-8e9d-b146bdd811f2\r\n\r\nThese
changes improve the resolution of the integration field
metadata:\r\n\r\n- The `integration` and `dataset` params are no longer
required to\r\nattempt resolving and integration field metadata.\r\nThey
are still accepted as an explicit hint in case we cannot
infer\r\ncorrectly some integration packages from the field name.\r\n-
The above change enables querying fields from different
integrations\r\nand datasets at once, enabling metadata retrieval for
mixed data\r\nsources.\r\n- The integration retrieved from the EPR is
now cached with its relevant\r\nversion, solving a potential corner case
as
explained\r\n[here](https://github.com/elastic/kibana/pull/183806#pullrequestreview-2088102130).\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ae9cafd8-2581-4ce0-9242-cbb4e37c7702\r\n\r\n---------\r\n\r\nCo-authored-by:
Marco Antonio Ghiani
<[email protected]>","sha":"2b7c72c6193cf46c5cf883dafb8521f4a6805cd4","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-minor","Team:obs-ux-logs"],"title":"[Fields
Metadata] Improve integration fields resolution and
caching","number":195405,"url":"https://github.com/elastic/kibana/pull/195405","mergeCommit":{"message":"[Fields
Metadata] Improve integration fields resolution and caching
(#195405)\n\n## 📓 Summary\r\n\r\nBrowsing fields from the Discover
sidebar, I noticed integration fields\r\nnever show a related
description even if they exist. The same is\r\nhappening in the fields
table for the document detail flyout.\r\n\r\nThis happens due to
`integration` and `dataset` parameters not being\r\npassed to the
service.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/0946cc71-44fb-4fc7-8e9d-b146bdd811f2\r\n\r\nThese
changes improve the resolution of the integration field
metadata:\r\n\r\n- The `integration` and `dataset` params are no longer
required to\r\nattempt resolving and integration field metadata.\r\nThey
are still accepted as an explicit hint in case we cannot
infer\r\ncorrectly some integration packages from the field name.\r\n-
The above change enables querying fields from different
integrations\r\nand datasets at once, enabling metadata retrieval for
mixed data\r\nsources.\r\n- The integration retrieved from the EPR is
now cached with its relevant\r\nversion, solving a potential corner case
as
explained\r\n[here](https://github.com/elastic/kibana/pull/183806#pullrequestreview-2088102130).\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ae9cafd8-2581-4ce0-9242-cbb4e37c7702\r\n\r\n---------\r\n\r\nCo-authored-by:
Marco Antonio Ghiani
<[email protected]>","sha":"2b7c72c6193cf46c5cf883dafb8521f4a6805cd4"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195405","number":195405,"mergeCommit":{"message":"[Fields
Metadata] Improve integration fields resolution and caching
(#195405)\n\n## 📓 Summary\r\n\r\nBrowsing fields from the Discover
sidebar, I noticed integration fields\r\nnever show a related
description even if they exist. The same is\r\nhappening in the fields
table for the document detail flyout.\r\n\r\nThis happens due to
`integration` and `dataset` parameters not being\r\npassed to the
service.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/0946cc71-44fb-4fc7-8e9d-b146bdd811f2\r\n\r\nThese
changes improve the resolution of the integration field
metadata:\r\n\r\n- The `integration` and `dataset` params are no longer
required to\r\nattempt resolving and integration field metadata.\r\nThey
are still accepted as an explicit hint in case we cannot
infer\r\ncorrectly some integration packages from the field name.\r\n-
The above change enables querying fields from different
integrations\r\nand datasets at once, enabling metadata retrieval for
mixed data\r\nsources.\r\n- The integration retrieved from the EPR is
now cached with its relevant\r\nversion, solving a potential corner case
as
explained\r\n[here](https://github.com/elastic/kibana/pull/183806#pullrequestreview-2088102130).\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ae9cafd8-2581-4ce0-9242-cbb4e37c7702\r\n\r\n---------\r\n\r\nCo-authored-by:
Marco Antonio Ghiani
<[email protected]>","sha":"2b7c72c6193cf46c5cf883dafb8521f4a6805cd4"}}]}]
BACKPORT-->

Co-authored-by: Marco Antonio Ghiani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-logs Observability Logs User Experience Team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants