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

[One Discover] Add summary column for logs contextual experience #192567

Merged

Conversation

tonyghiani
Copy link
Contributor

@tonyghiani tonyghiani commented Sep 11, 2024

📓 Summary

Closes https://github.com/elastic/logs-dev/issues/165

This work introduces a Summary column as a replacement for the Document one for the Discover logs contextual experience.

We also decided to port this change as a replacement for the resource and content virtual columns in Logs Explorer to have a better alignment between the 2 apps.

🎥 Demo

summary_column_demo_fullhd.mov

💡 Reviewer hints

I left notes through the changes to help answer some questions.

The notable changes on this PR are:

  • Rename Document column to Summary.
  • Refactor resource and content virtual columns into a single Summary column, which replaces the default Summary content for the logs' contextual experience.
  • Provide support for the plugin services to the context awareness profiles.
  • Disable virtual columns (clean up will go in a follow-up work) in Logs Explorer and rely on the Summary column as the default selection.

@tonyghiani tonyghiani added release_note:feature Makes this part of the condensed release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:obs-ux-logs Observability Logs User Experience Team Project:OneDiscover Enrich Discover with contextual awareness labels Sep 11, 2024
@obltmachine
Copy link

🤖 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!)

@tonyghiani tonyghiani added the backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) label Sep 25, 2024
Copy link
Contributor

@logeekal logeekal left a comment

Choose a reason for hiding this comment

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

Looks good from the investigations side. Thanks.

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Great work on the updates! Basically all of the issues I reported have been resolved now, and it's looking nice and polished 👌 There are just a couple of final things left to address and this will be good to go on my end. We'll also clarify tomorrow in the sync that we're good to merge this into the generic logs profile just to be certain.

I think you mean the size of the badges doesn't scale with density changes.

Yeah I was referring to the text size of the badges, but if the scale is hardcoded, we're definitely good to leave it.

I updated the FT test for the cell renderer extension point, I think is ok to start like this since we might change more on this column soon.

Agreed, these tests should be good for now, thanks!

src/plugins/discover/public/plugin.tsx Outdated Show resolved Hide resolved
data-test-subj={dataTestSubj}
css={badgeCss}
/>
<EuiFlexGroup alignItems="center" css={{ height: '100%' }}>
Copy link
Contributor

Choose a reason for hiding this comment

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

I definitely agree there are challenges around vertically aligning the badges in cells, but in this case I think the magic pixel number results in a better UX than vertically centering for multiple lines:
image

I also think the upcoming EUI changes will fix the issue with badges being cut off for custom row height = 1, which gets rid of part of the issue. In this case I'd recommend we revert these changes to keep the negative margin and potentially address this separately as a followup if there's a better approach.

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

All of the remaining comments have been resolved, and we got confirmation we're good to merge this into the generic logs profile. There's just one tiny thing left to do (revert some changes), then I promise I'll get out of the way and let this get merged 🙏

data-test-subj={dataTestSubj}
css={badgeCss}
/>
<EuiFlexGroup alignItems="center" css={{ height: '100%' }}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately it looks like these changes never got reverted and are still present in the PR branch:
image

Could we please revert these as the final task on this PR?

Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Looks like we're all good to go now, so let's merge this thing 🤘 Awesome work on this, thanks! It's a huge step forward for One Discover and I'm excited to get it out to users soon.

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 30, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 70d4bb6
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-192567-70d4bb6867a5

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
canvas 1292 1291 -1
cloudSecurityPosture 652 651 -1
discover 998 992 -6
esqlDataGrid 364 363 -1
eventAnnotationListing 579 578 -1
lens 1462 1461 -1
logsExplorer 563 562 -1
observability 1061 1060 -1
searchPlayground 242 241 -1
securitySolution 5931 5930 -1
slo 847 846 -1
unifiedDocViewer 221 220 -1
unifiedHistogram 186 185 -1
total -18

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
@kbn/unified-data-table 90 110 +20

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cloudSecurityPosture 506.5KB 506.8KB +317.0B
discover 815.4KB 819.2KB +3.8KB
esqlDataGrid 154.0KB 154.3KB +318.0B
logsExplorer 222.7KB 222.7KB +1.0B
securitySolution 20.5MB 20.5MB +1.6KB
slo 854.2KB 854.5KB +317.0B
unifiedDocViewer 125.9KB 125.8KB -75.0B
total +6.2KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
discover 49.0KB 49.0KB +14.0B
logsExplorer 27.5KB 27.5KB -3.0B
total +11.0B
Unknown metric groups

API count

id before after diff
@kbn/unified-data-table 165 185 +20

async chunk count

id before after diff
discover 27 28 +1

ESLint disabled line counts

id before after diff
discover 24 27 +3

Total ESLint disabled count

id before after diff
discover 26 29 +3

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @tonyghiani

@tonyghiani tonyghiani merged commit 36a73ce into elastic:main Sep 30, 2024
26 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@tonyghiani tonyghiani deleted the feature/one-discover-summary-column branch September 30, 2024 09:08
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 30, 2024
…stic#192567)

## 📓 Summary

Closes elastic/logs-dev#165

This work introduces a Summary column as a replacement for the Document
one for the Discover logs contextual experience.
> We also decided to port this change as a replacement for the
**resource** and **content** virtual columns in Logs Explorer to have a
better alignment between the 2 apps.

## 🎥 Demo

https://github.com/user-attachments/assets/3dfca483-768e-471c-8735-d5fc8bbd5d00

## 💡 Reviewer hints

I left notes through the changes to help answer some questions.

The notable changes on this PR are:
- Rename `Document` column to `Summary`.
- Refactor `resource` and `content` virtual columns into a single
`Summary` column, which replaces the default Summary content for the
logs' contextual experience.
- Provide support for the plugin services to the context awareness
profiles.
- Disable virtual columns (clean up will go in a follow-up work) in Logs
Explorer and rely on the Summary column as the default selection.

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
(cherry picked from commit 36a73ce)
@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 Sep 30, 2024
#192567) (#194389)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[One Discover] Add summary column for logs contextual experience
(#192567)](#192567)

<!--- 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":"marcoantonio.ghiani01@gmail.com"},"sourceCommit":{"committedDate":"2024-09-30T09:08:03Z","message":"[One
Discover] Add summary column for logs contextual experience
(#192567)\n\n## 📓 Summary\r\n\r\nCloses
https://github.com/elastic/logs-dev/issues/165\r\n\r\nThis work
introduces a Summary column as a replacement for the Document\r\none for
the Discover logs contextual experience.\r\n> We also decided to port
this change as a replacement for the\r\n**resource** and **content**
virtual columns in Logs Explorer to have a\r\nbetter alignment between
the 2 apps.\r\n\r\n## 🎥
Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/3dfca483-768e-471c-8735-d5fc8bbd5d00\r\n\r\n##
💡 Reviewer hints\r\n\r\nI left notes through the changes to help answer
some questions.\r\n\r\nThe notable changes on this PR are:\r\n- Rename
`Document` column to `Summary`.\r\n- Refactor `resource` and `content`
virtual columns into a single\r\n`Summary` column, which replaces the
default Summary content for the\r\nlogs' contextual experience.\r\n-
Provide support for the plugin services to the context
awareness\r\nprofiles.\r\n- Disable virtual columns (clean up will go in
a follow-up work) in Logs\r\nExplorer and rely on the Summary column as
the default selection.\r\n\r\n---------\r\n\r\nCo-authored-by: Marco
Antonio Ghiani <marcoantonio.ghiani@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Davis McPhee
<davis.mcphee@elastic.co>","sha":"36a73ce52e2ca14c2d46c3a6504ebaa53fed9f98","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["v9.0.0","release_note:feature","Team:DataDiscovery","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-logs","Project:OneDiscover"],"title":"[One
Discover] Add summary column for logs contextual
experience","number":192567,"url":"https://github.com/elastic/kibana/pull/192567","mergeCommit":{"message":"[One
Discover] Add summary column for logs contextual experience
(#192567)\n\n## 📓 Summary\r\n\r\nCloses
https://github.com/elastic/logs-dev/issues/165\r\n\r\nThis work
introduces a Summary column as a replacement for the Document\r\none for
the Discover logs contextual experience.\r\n> We also decided to port
this change as a replacement for the\r\n**resource** and **content**
virtual columns in Logs Explorer to have a\r\nbetter alignment between
the 2 apps.\r\n\r\n## 🎥
Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/3dfca483-768e-471c-8735-d5fc8bbd5d00\r\n\r\n##
💡 Reviewer hints\r\n\r\nI left notes through the changes to help answer
some questions.\r\n\r\nThe notable changes on this PR are:\r\n- Rename
`Document` column to `Summary`.\r\n- Refactor `resource` and `content`
virtual columns into a single\r\n`Summary` column, which replaces the
default Summary content for the\r\nlogs' contextual experience.\r\n-
Provide support for the plugin services to the context
awareness\r\nprofiles.\r\n- Disable virtual columns (clean up will go in
a follow-up work) in Logs\r\nExplorer and rely on the Summary column as
the default selection.\r\n\r\n---------\r\n\r\nCo-authored-by: Marco
Antonio Ghiani <marcoantonio.ghiani@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Davis McPhee
<davis.mcphee@elastic.co>","sha":"36a73ce52e2ca14c2d46c3a6504ebaa53fed9f98"}},"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/192567","number":192567,"mergeCommit":{"message":"[One
Discover] Add summary column for logs contextual experience
(#192567)\n\n## 📓 Summary\r\n\r\nCloses
https://github.com/elastic/logs-dev/issues/165\r\n\r\nThis work
introduces a Summary column as a replacement for the Document\r\none for
the Discover logs contextual experience.\r\n> We also decided to port
this change as a replacement for the\r\n**resource** and **content**
virtual columns in Logs Explorer to have a\r\nbetter alignment between
the 2 apps.\r\n\r\n## 🎥
Demo\r\n\r\n\r\nhttps://github.com/user-attachments/assets/3dfca483-768e-471c-8735-d5fc8bbd5d00\r\n\r\n##
💡 Reviewer hints\r\n\r\nI left notes through the changes to help answer
some questions.\r\n\r\nThe notable changes on this PR are:\r\n- Rename
`Document` column to `Summary`.\r\n- Refactor `resource` and `content`
virtual columns into a single\r\n`Summary` column, which replaces the
default Summary content for the\r\nlogs' contextual experience.\r\n-
Provide support for the plugin services to the context
awareness\r\nprofiles.\r\n- Disable virtual columns (clean up will go in
a follow-up work) in Logs\r\nExplorer and rely on the Summary column as
the default selection.\r\n\r\n---------\r\n\r\nCo-authored-by: Marco
Antonio Ghiani <marcoantonio.ghiani@elastic.co>\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Davis McPhee
<davis.mcphee@elastic.co>","sha":"36a73ce52e2ca14c2d46c3a6504ebaa53fed9f98"}}]}]
BACKPORT-->

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>
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) ci:project-deploy-observability Create an Observability project Project:OneDiscover Enrich Discover with contextual awareness release_note:feature Makes this part of the condensed release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. 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.

9 participants