Skip to content

[Logs Explorer] Add settings for Logs Explorer features#178602

Merged
tonyghiani merged 21 commits intoelastic:mainfrom
tonyghiani:177703-logs-explorer-settings
Mar 20, 2024
Merged

[Logs Explorer] Add settings for Logs Explorer features#178602
tonyghiani merged 21 commits intoelastic:mainfrom
tonyghiani:177703-logs-explorer-settings

Conversation

@tonyghiani
Copy link
Copy Markdown
Contributor

@tonyghiani tonyghiani commented Mar 13, 2024

📓 Summary

Closes #177703

This work supports a new Logs Explorer UI setting to customize the data view patterns which allow to browse data views directly in Logs Explorer. It's a follow-up work of #176078, where we introduced a way to recognise logs-backed data views and explore their entires without redirecting to Discover.

The previously hard-coded list of allowed patterns (logs, auditbeat, filebeat, winbeat) is now used as the default value for the UI setting "Logs Explorer allowed data views", where is possible to add more base patterns or full indices that should be available for exploration in Logs Explorer.

🎥 Demo

demo.mov

👣 Next steps

  • Create a dashboard to track the updates on this setting and link it to the team docs.

@tonyghiani tonyghiani added release_note:skip Skip the PR/issue when compiling release notes Team:obs-onboarding Observability Onboarding Team Feature:LogsExplorer Logs Explorer feature labels Mar 13, 2024
@ghost
Copy link
Copy Markdown

ghost commented Mar 13, 2024

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

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

export const buildIndexPatternRegExp = (basePatterns: string[]) => {
// Create the base patterns union with strict boundaries
const basePatternGroup = `\\b(${basePatterns.join('|')})\\b[^,\\s]+`;
const basePatternGroup = `\\b(${basePatterns.join('|')})\\b([^,\\s]+)?`;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: update the regex also to match standalone indices with no wildcard patterns.

};
}

testAgainstAllowedList(allowedList: string[]) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: I opted for an approach where a setting preference is not coupled to this entity to make decisions on the user journey flow. Ideally, we'll conditionally be able to make decisions against a data view based on any setting passed, without affecting the inner shape of this entity.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: Just moved some code from the state machine config into a service module, nothing new here on the implemented logic.

@tonyghiani tonyghiani marked this pull request as ready for review March 14, 2024 09:18
@tonyghiani tonyghiani requested review from a team as code owners March 14, 2024 09:18
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@tonyghiani
Copy link
Copy Markdown
Contributor Author

/oblt-deploy

@tonyghiani tonyghiani requested a review from a team as a code owner March 19, 2024 08:43
Copy link
Copy Markdown
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

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

Management changes lgtm

Copy link
Copy Markdown
Member

@maryam-saeidi maryam-saeidi left a comment

Choose a reason for hiding this comment

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

Added OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID serverless setting LGTM!

Copy link
Copy Markdown
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

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

shared-ux changes lgtm

Copy link
Copy Markdown
Contributor

@mgiota mgiota left a comment

Choose a reason for hiding this comment

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

LGTM!

@Kerry350 Kerry350 self-requested a review March 19, 2024 11:57
Copy link
Copy Markdown
Contributor

@Kerry350 Kerry350 left a comment

Choose a reason for hiding this comment

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

Nice work 🙌 LGTM, and thanks for the additional code comments.

Screenshot 2024-03-19 at 13 02 16

Screenshot 2024-03-19 at 13 02 25

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
logsExplorer 683 684 +1

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/management-settings-ids 132 133 +1

Async chunks

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

id before after diff
logsExplorer 1.1MB 1.1MB +849.0B

Page load bundle

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

id before after diff
logsExplorer 56.1KB 56.2KB +130.0B
Unknown metric groups

API count

id before after diff
@kbn/management-settings-ids 135 136 +1

History

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

@tonyghiani tonyghiani merged commit c8c3f19 into elastic:main Mar 20, 2024
@tonyghiani tonyghiani deleted the 177703-logs-explorer-settings branch March 20, 2024 10:55
@kibanamachine kibanamachine added v8.14.0 backport:skip This PR does not require backporting labels Mar 20, 2024
gbamparop added a commit that referenced this pull request Feb 6, 2025
…209120)

## 📓 Summary
Removes the `observability:logsExplorer:allowedDataViews` advanced
setting that was introduced by
#178602 as Logs Explorer is [no
longer available](#203685) in
Serverless and 9.0.

Closes #209092

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Feb 6, 2025
…lastic#209120)

## 📓 Summary
Removes the `observability:logsExplorer:allowedDataViews` advanced
setting that was introduced by
elastic#178602 as Logs Explorer is [no
longer available](elastic#203685) in
Serverless and 9.0.

Closes elastic#209092

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 3e5f55d)
kibanamachine added a commit that referenced this pull request Feb 6, 2025
…ting (#209120) (#210005)

# Backport

This will backport the following commits from `main` to `9.0`:
- [Remove observability:logsExplorer:allowedDataViews advanced setting
(#209120)](#209120)

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

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

<!--BACKPORT [{"author":{"name":"Giorgos
Bamparopoulos","email":"georgios.bamparopoulos@elastic.co"},"sourceCommit":{"committedDate":"2025-02-06T13:28:00Z","message":"Remove
observability:logsExplorer:allowedDataViews advanced setting
(#209120)\n\n## 📓 Summary\r\nRemoves the
`observability:logsExplorer:allowedDataViews` advanced\r\nsetting that
was introduced by\r\nhttps://github.com//pull/178602 as
Logs Explorer is [no\r\nlonger
available](#203685)
in\r\nServerless and 9.0.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/209092\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"3e5f55dd0258646d976d776127e39bdb04859568","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","v9.1.0"],"title":"Remove
observability:logsExplorer:allowedDataViews advanced
setting","number":209120,"url":"https://github.com/elastic/kibana/pull/209120","mergeCommit":{"message":"Remove
observability:logsExplorer:allowedDataViews advanced setting
(#209120)\n\n## 📓 Summary\r\nRemoves the
`observability:logsExplorer:allowedDataViews` advanced\r\nsetting that
was introduced by\r\nhttps://github.com//pull/178602 as
Logs Explorer is [no\r\nlonger
available](#203685)
in\r\nServerless and 9.0.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/209092\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"3e5f55dd0258646d976d776127e39bdb04859568"}},"sourceBranch":"main","suggestedTargetBranches":["9.0"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209120","number":209120,"mergeCommit":{"message":"Remove
observability:logsExplorer:allowedDataViews advanced setting
(#209120)\n\n## 📓 Summary\r\nRemoves the
`observability:logsExplorer:allowedDataViews` advanced\r\nsetting that
was introduced by\r\nhttps://github.com//pull/178602 as
Logs Explorer is [no\r\nlonger
available](#203685)
in\r\nServerless and 9.0.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/209092\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"3e5f55dd0258646d976d776127e39bdb04859568"}}]}]
BACKPORT-->

Co-authored-by: Giorgos Bamparopoulos <georgios.bamparopoulos@elastic.co>
drewdaemon pushed a commit to drewdaemon/kibana that referenced this pull request Feb 6, 2025
…lastic#209120)

## 📓 Summary
Removes the `observability:logsExplorer:allowedDataViews` advanced
setting that was introduced by
elastic#178602 as Logs Explorer is [no
longer available](elastic#203685) in
Serverless and 9.0.

Closes elastic#209092

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:LogsExplorer Logs Explorer feature release_note:skip Skip the PR/issue when compiling release notes Team:obs-onboarding Observability Onboarding Team v8.14.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Logs Explorer] Provide support for user settings

10 participants