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

[Logs Overview] Overview component (iteration 1) (attempt 2) #195673

Conversation

weltenwort
Copy link
Member

@weltenwort weltenwort commented Oct 9, 2024

ℹ️ This is a re-submission of #191899 which was reverted due to a storybook build problem.

📝 Summary

This introduces a "Logs Overview" component for use in solution UIs behind a feature flag.

🏴‍☠️ Feature flag

The new logs overview is currently visible in the "Logs" tab of APM services when the feature flag observability:newLogsOverview is enabled in the advanced settings:

image

🎨 Previews

In APM UI

logs-overview-in-apm-2024-09-18

In the hosts UI

logs-overview-in-hosts-2024-09-18

No log entries

logs-overview-in-apm-2024-09-18-no-categories

⚠️ Known issues

❓ Open questions

See: #191899 (comment)

  • The change types returned by the change_point agg have some limitations:
    • Some of them are hard to interpret (i.e. non-stationary)
    • They are sensitive to slight changes in the distribution. A change can flap between a step, a spike and a distribution_change when just a few buckets are different. So it might be advisable to use the change point buckets detected and re-interpret their meaning using the histogram.
  • It's debatable whether a lexicographical sort order of the change types is a good idea. We might want to come up with more useful sorting weights.
  • Since the changes types shown in the design mock-ups don't line up with reality the assignment of the colors is unclear. Currently no types' badges are colored.

🕵️‍♀️ Review notes

  • This adds XState v5 as an additional dependency to start the transition. It can be imported as xstate5. Similarly, @xstate5/react is available.

Release Note

Add experimental logs overview to the observability hosts and service overviews

@weltenwort weltenwort requested review from a team as code owners October 9, 2024 19:35
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Oct 9, 2024
@elasticmachine
Copy link
Contributor

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

Copy link
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.

kbn management changes lgtm

Copy link
Contributor

@crespocarlos crespocarlos left a comment

Choose a reason for hiding this comment

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

Nice additions to synthtrace. Thanks.

@@ -84,6 +85,7 @@ export const LogsTabContent = () => {
query={logsLinkToStreamQuery}
logView={logView}
/>
]
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we can remove this?

Copy link
Member Author

Choose a reason for hiding this comment

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

oops, indeed

Comment on lines +194 to +198
{
term: {
[SERVICE_ENVIRONMENT]: environment,
},
},
Copy link
Contributor

@crespocarlos crespocarlos Oct 10, 2024

Choose a reason for hiding this comment

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

We could use helper functions to build the filer clause. Wdyt?

...termQuery(SERVICE_ENVIRONMENT, environment),

Same for the exists below

existsQuery(SERVICE_ENVIRONMENT)

@weltenwort
Copy link
Member Author

weltenwort commented Oct 10, 2024

Hey @crespocarlos, thanks for the review and the suggestions. Since this is a re-submission of #191899, which was already merged but reverted, I hope you don't mind if I defer your suggested improvements to a follow-up PR?

@crespocarlos
Copy link
Contributor

Hey @crespocarlos, thanks for the review and the suggestions. Since this is a re-submission of #191899, which was already merged but reverted, I hope you don't mind if I defer your suggested improvements to a follow-up PR?

Sure thing :)

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 10, 2024

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
datasetQuality 224 225 +1
infra 1508 1509 +1
logsExplorer 562 563 +1
logsShared 228 298 +70
observabilityLogsExplorer 203 204 +1
observabilityOnboarding 255 256 +1
total +75

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/apm-synthtrace-client 208 223 +15
@kbn/management-settings-ids 142 143 +1
@kbn/observability-logs-overview - 27 +27
@kbn/xstate-utils 13 14 +1
logsShared 281 284 +3
total +47

Async chunks

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

id before after diff
apm 3.4MB 3.4MB +1.7KB
infra 1.6MB 1.6MB +632.0B
logsShared 140.5KB 327.3KB +186.8KB
total +189.2KB

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
@kbn/apm-synthtrace-client 33 36 +3
@kbn/observability-logs-overview - 3 +3
logsShared 32 34 +2
total +8

Page load bundle

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

id before after diff
logsShared 173.3KB 174.5KB +1.1KB
Unknown metric groups

API count

id before after diff
@kbn/apm-synthtrace-client 208 223 +15
@kbn/management-settings-ids 144 145 +1
@kbn/observability-logs-overview - 29 +29
@kbn/xstate-utils 13 14 +1
logsShared 310 313 +3
total +49

async chunk count

id before after diff
logsShared 14 15 +1

ESLint disabled line counts

id before after diff
@kbn/xstate-utils 0 1 +1

Total ESLint disabled count

id before after diff
@kbn/xstate-utils 0 1 +1

History

cc @weltenwort

Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

Telemetry changes LGTM

@weltenwort
Copy link
Member Author

Thanks everyone for re-approving so quickly ❤️

@weltenwort weltenwort merged commit 0caea22 into elastic:main Oct 10, 2024
44 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 195673

Questions ?

Please refer to the Backport tool documentation

@weltenwort
Copy link
Member Author

💚 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

weltenwort added a commit to weltenwort/kibana that referenced this pull request Oct 10, 2024
…#195673)

This is a re-submission of elastic#191899, which was reverted due to
a storybook build problem. This introduces a "Logs Overview" component for use in solution UIs
behind a feature flag.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Kerry Gallagher <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 0caea22)

# Conflicts:
#	.github/CODEOWNERS
#	src/plugins/telemetry/schema/oss_plugins.json
weltenwort added a commit that referenced this pull request Oct 10, 2024
…195673) (#195742)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Logs Overview] Overview component (iteration 1) (attempt 2)
(#195673)](#195673)

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

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

<!--BACKPORT [{"author":{"name":"Felix
Stürmer","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-10T10:46:25Z","message":"[Logs
Overview] Overview component (iteration 1) (attempt 2) (#195673)\n\nThis
is a re-submission of #191899,
which was reverted due to\r\na storybook build problem. This introduces
a \"Logs Overview\" component for use in solution UIs\r\nbehind a
feature flag.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Kerry Gallagher
<[email protected]>\r\nCo-authored-by: Elastic
Machine
<[email protected]>","sha":"0caea22006591486fbfd80d7899e116743acd8a2","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Logs
UI","v9.0.0","release_note:feature","backport:prev-minor","ci:build-storybooks","ci:project-deploy-observability","Team:obs-ux-logs","Team:obs-ux-infra_services"],"number":195673,"url":"https://github.com/elastic/kibana/pull/195673","mergeCommit":{"message":"[Logs
Overview] Overview component (iteration 1) (attempt 2) (#195673)\n\nThis
is a re-submission of #191899,
which was reverted due to\r\na storybook build problem. This introduces
a \"Logs Overview\" component for use in solution UIs\r\nbehind a
feature flag.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Kerry Gallagher
<[email protected]>\r\nCo-authored-by: Elastic
Machine
<[email protected]>","sha":"0caea22006591486fbfd80d7899e116743acd8a2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195673","number":195673,"mergeCommit":{"message":"[Logs
Overview] Overview component (iteration 1) (attempt 2) (#195673)\n\nThis
is a re-submission of #191899,
which was reverted due to\r\na storybook build problem. This introduces
a \"Logs Overview\" component for use in solution UIs\r\nbehind a
feature flag.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Kerry Gallagher
<[email protected]>\r\nCo-authored-by: Elastic
Machine
<[email protected]>","sha":"0caea22006591486fbfd80d7899e116743acd8a2"}}]}]
BACKPORT-->
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:build-storybooks ci:project-deploy-observability Create an Observability project Feature:Logs UI Logs UI feature release_note:feature Makes this part of the condensed release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience 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.

[Logs Overview] Enhanced logs component for solution UIs
8 participants