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

[8.17] [Infra][ObsUX] Hosts & Container Logs only overview (#202992) #203815

Merged
merged 4 commits into from
Dec 17, 2024

Conversation

Bluefinger
Copy link
Contributor

Backport

This will backport the following commits from main to 8.17:

Questions ?

Please refer to the Backport tool documentation

## Summary

Enables a logs only overview for hosts & containers. Disables the
metrics tab as there's no data incoming for metrics, and provides Logs
charts on the overview page detailing the Log Rate (all logs generated)
and Log Error Rate (all recorded errors).

https://github.com/user-attachments/assets/ced14b6d-dd08-4514-9066-6c02c62d5ff8

Closes elastic#201752

## How to test

This is tested using synthtrace data, loading the scenario below:

```
node scripts/synthtrace traces_logs_entities.ts --live
```

This loads a logs-only host, though if other scenarios contain logs only
containers, feel free to use those as well.

* Go to Inventory page. Click on a host or container.
* If it is a logs only host/container, no metrics tab should be shown.
Metrics KPI charts should be replaced with Logs KPI charts (Log Rate and
Log Error Rate).
* If the host/container contains metrics, the metrics tab should be
visible and the normal Metrics KPI charts should be present.

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 305bb1b)

# Conflicts:
#	x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx
Copy link
Contributor

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


// Don't try to test a hardcoded value, just use what is provided by EUI.
// If in the future this value changes, the tests won't break.
seriesDefaultColor = result.current.euiTheme.colors.lightestShade;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to change the variable being used here from backgroundLightText to lightestShade as the new semantic tokens aren't in 8.17 (but are in 8.x branch)

const { euiTheme } = useEuiTheme();

// Prevent empty string being used as a valid color
return seriesColor || euiTheme.colors.lightestShade;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above

@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 17, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 59732ab
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-203815-59732abd8f7a

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #31 / dashboard app - group 3 dashboard panel copy to "after all" hook for "it always appends new panels instead of overwriting"
  • [job] [logs] FTR Configs #31 / dashboard app - group 3 dashboard panel copy to copies a panel to an existing dashboard
  • [job] [logs] FTR Configs #33 / InfraOps App Metrics UI Node Details #Asset Type: host Processes Tab should render processes tab and with Total Value summary

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
infra 1529 1532 +3

Async chunks

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

id before after diff
infra 1.7MB 1.7MB +1.7KB

History

@Bluefinger Bluefinger merged commit b2f5821 into elastic:8.17 Dec 17, 2024
8 checks passed
Bluefinger added a commit that referenced this pull request Dec 24, 2024
…204984)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Infra][ObsUX] Hosts & Container Logs only overview
(#202992)](#202992)

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

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

<!--BACKPORT [{"author":{"name":"Gonçalo Rica Pais da
Silva","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-10T16:38:19Z","message":"[Infra][ObsUX]
Hosts & Container Logs only overview (#202992)\n\n##
Summary\r\n\r\nEnables a logs only overview for hosts & containers.
Disables the\r\nmetrics tab as there's no data incoming for metrics, and
provides Logs\r\ncharts on the overview page detailing the Log Rate (all
logs generated)\r\nand Log Error Rate (all recorded
errors).\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ced14b6d-dd08-4514-9066-6c02c62d5ff8\r\n\r\nCloses
#201752\r\n\r\n## How to test\r\n\r\nThis is tested using synthtrace
data, loading the scenario below:\r\n\r\n```\r\nnode scripts/synthtrace
traces_logs_entities.ts --live\r\n```\r\n\r\nThis loads a logs-only
host, though if other scenarios contain logs only\r\ncontainers, feel
free to use those as well.\r\n\r\n* Go to Inventory page. Click on a
host or container.\r\n* If it is a logs only host/container, no metrics
tab should be shown.\r\nMetrics KPI charts should be replaced with Logs
KPI charts (Log Rate and\r\nLog Error Rate).\r\n* If the host/container
contains metrics, the metrics tab should be\r\nvisible and the normal
Metrics KPI charts should be
present.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"305bb1b8879dd41077afa79195ac920e7d8080e1","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport
missing","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.17.0","v8.17.1"],"number":202992,"url":"https://github.com/elastic/kibana/pull/202992","mergeCommit":{"message":"[Infra][ObsUX]
Hosts & Container Logs only overview (#202992)\n\n##
Summary\r\n\r\nEnables a logs only overview for hosts & containers.
Disables the\r\nmetrics tab as there's no data incoming for metrics, and
provides Logs\r\ncharts on the overview page detailing the Log Rate (all
logs generated)\r\nand Log Error Rate (all recorded
errors).\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ced14b6d-dd08-4514-9066-6c02c62d5ff8\r\n\r\nCloses
#201752\r\n\r\n## How to test\r\n\r\nThis is tested using synthtrace
data, loading the scenario below:\r\n\r\n```\r\nnode scripts/synthtrace
traces_logs_entities.ts --live\r\n```\r\n\r\nThis loads a logs-only
host, though if other scenarios contain logs only\r\ncontainers, feel
free to use those as well.\r\n\r\n* Go to Inventory page. Click on a
host or container.\r\n* If it is a logs only host/container, no metrics
tab should be shown.\r\nMetrics KPI charts should be replaced with Logs
KPI charts (Log Rate and\r\nLog Error Rate).\r\n* If the host/container
contains metrics, the metrics tab should be\r\nvisible and the normal
Metrics KPI charts should be
present.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"305bb1b8879dd41077afa79195ac920e7d8080e1"}},"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/202992","number":202992,"mergeCommit":{"message":"[Infra][ObsUX]
Hosts & Container Logs only overview (#202992)\n\n##
Summary\r\n\r\nEnables a logs only overview for hosts & containers.
Disables the\r\nmetrics tab as there's no data incoming for metrics, and
provides Logs\r\ncharts on the overview page detailing the Log Rate (all
logs generated)\r\nand Log Error Rate (all recorded
errors).\r\n\r\n\r\nhttps://github.com/user-attachments/assets/ced14b6d-dd08-4514-9066-6c02c62d5ff8\r\n\r\nCloses
#201752\r\n\r\n## How to test\r\n\r\nThis is tested using synthtrace
data, loading the scenario below:\r\n\r\n```\r\nnode scripts/synthtrace
traces_logs_entities.ts --live\r\n```\r\n\r\nThis loads a logs-only
host, though if other scenarios contain logs only\r\ncontainers, feel
free to use those as well.\r\n\r\n* Go to Inventory page. Click on a
host or container.\r\n* If it is a logs only host/container, no metrics
tab should be shown.\r\nMetrics KPI charts should be replaced with Logs
KPI charts (Log Rate and\r\nLog Error Rate).\r\n* If the host/container
contains metrics, the metrics tab should be\r\nvisible and the normal
Metrics KPI charts should be
present.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>","sha":"305bb1b8879dd41077afa79195ac920e7d8080e1"}},{"branch":"8.17","label":"v8.17.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/203815","number":203815,"state":"MERGED","mergeCommit":{"sha":"b2f582178878c7ff3093f620c0a30c102e1970d5","message":"[8.17]
[Infra][ObsUX] Hosts & Container Logs only overview (#202992)
(#203815)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.17`:\n- [[Infra][ObsUX] Hosts & Container Logs only
overview\n(#202992)](https://github.com/elastic/kibana/pull/202992)\n\n<!---
Backport version: 8.9.8 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Gonçalo Rica Pais
da\nSilva\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-12-10T16:38:19Z\",\"message\":\"[Infra][ObsUX]\nHosts
& Container Logs only overview
(#202992)\\n\\n##\nSummary\\r\\n\\r\\nEnables a logs only overview for
hosts & containers.\nDisables the\\r\\nmetrics tab as there's no data
incoming for metrics, and\nprovides Logs\\r\\ncharts on the overview
page detailing the Log Rate (all\nlogs generated)\\r\\nand Log Error
Rate (all
recorded\nerrors).\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/ced14b6d-dd08-4514-9066-6c02c62d5ff8\\r\\n\\r\\nCloses\n#201752\\r\\n\\r\\n##
How to test\\r\\n\\r\\nThis is tested using synthtrace\ndata, loading
the scenario below:\\r\\n\\r\\n```\\r\\nnode
scripts/synthtrace\ntraces_logs_entities.ts
--live\\r\\n```\\r\\n\\r\\nThis loads a logs-only\nhost, though if other
scenarios contain logs only\\r\\ncontainers, feel\nfree to use those as
well.\\r\\n\\r\\n* Go to Inventory page. Click on a\nhost or
container.\\r\\n* If it is a logs only host/container, no metrics\ntab
should be shown.\\r\\nMetrics KPI charts should be replaced with
Logs\nKPI charts (Log Rate and\\r\\nLog Error Rate).\\r\\n* If the
host/container\ncontains metrics, the metrics tab should be\\r\\nvisible
and the normal\nMetrics KPI charts should
be\npresent.\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by: Elastic
Machine\n<[email protected]>\",\"sha\":\"305bb1b8879dd41077afa79195ac920e7d8080e1\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.18.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"backport:prev-minor\",\"ci:project-deploy-observability\",\"Team:obs-ux-infra_services\",\"v8.17.0\"],\"number\":202992,\"url\":\"https://github.com/elastic/kibana/pull/202992\",\"mergeCommit\":{\"message\":\"[Infra][ObsUX]\nHosts
& Container Logs only overview
(#202992)\\n\\n##\nSummary\\r\\n\\r\\nEnables a logs only overview for
hosts & containers.\nDisables the\\r\\nmetrics tab as there's no data
incoming for metrics, and\nprovides Logs\\r\\ncharts on the overview
page detailing the Log Rate (all\nlogs generated)\\r\\nand Log Error
Rate (all
recorded\nerrors).\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/ced14b6d-dd08-4514-9066-6c02c62d5ff8\\r\\n\\r\\nCloses\n#201752\\r\\n\\r\\n##
How to test\\r\\n\\r\\nThis is tested using synthtrace\ndata, loading
the scenario below:\\r\\n\\r\\n```\\r\\nnode
scripts/synthtrace\ntraces_logs_entities.ts
--live\\r\\n```\\r\\n\\r\\nThis loads a logs-only\nhost, though if other
scenarios contain logs only\\r\\ncontainers, feel\nfree to use those as
well.\\r\\n\\r\\n* Go to Inventory page. Click on a\nhost or
container.\\r\\n* If it is a logs only host/container, no metrics\ntab
should be shown.\\r\\nMetrics KPI charts should be replaced with
Logs\nKPI charts (Log Rate and\\r\\nLog Error Rate).\\r\\n* If the
host/container\ncontains metrics, the metrics tab should be\\r\\nvisible
and the normal\nMetrics KPI charts should
be\npresent.\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by: Elastic
Machine\n<[email protected]>\",\"sha\":\"305bb1b8879dd41077afa79195ac920e7d8080e1\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.17\"],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v9.0.0\",\"labelRegex\":\"^v9.0.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/202992\",\"number\":202992,\"mergeCommit\":{\"message\":\"[Infra][ObsUX]\nHosts
& Container Logs only overview
(#202992)\\n\\n##\nSummary\\r\\n\\r\\nEnables a logs only overview for
hosts & containers.\nDisables the\\r\\nmetrics tab as there's no data
incoming for metrics, and\nprovides Logs\\r\\ncharts on the overview
page detailing the Log Rate (all\nlogs generated)\\r\\nand Log Error
Rate (all
recorded\nerrors).\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/ced14b6d-dd08-4514-9066-6c02c62d5ff8\\r\\n\\r\\nCloses\n#201752\\r\\n\\r\\n##
How to test\\r\\n\\r\\nThis is tested using synthtrace\ndata, loading
the scenario below:\\r\\n\\r\\n```\\r\\nnode
scripts/synthtrace\ntraces_logs_entities.ts
--live\\r\\n```\\r\\n\\r\\nThis loads a logs-only\nhost, though if other
scenarios contain logs only\\r\\ncontainers, feel\nfree to use those as
well.\\r\\n\\r\\n* Go to Inventory page. Click on a\nhost or
container.\\r\\n* If it is a logs only host/container, no metrics\ntab
should be shown.\\r\\nMetrics KPI charts should be replaced with
Logs\nKPI charts (Log Rate and\\r\\nLog Error Rate).\\r\\n* If the
host/container\ncontains metrics, the metrics tab should be\\r\\nvisible
and the normal\nMetrics KPI charts should
be\npresent.\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by: Elastic
Machine\n<[email protected]>\",\"sha\":\"305bb1b8879dd41077afa79195ac920e7d8080e1\"}},{\"branch\":\"8.17\",\"label\":\"v8.17.0\",\"labelRegex\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"url\":\"https://github.com/elastic/kibana/pull/203644\",\"number\":203644,\"branch\":\"8.x\",\"state\":\"OPEN\"}]}]\nBACKPORT-->"}},{"url":"https://github.com/elastic/kibana/pull/203644","number":203644,"branch":"8.x","state":"OPEN"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci:project-deploy-observability Create an Observability project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants