-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Infra][ObsUX] Hosts & Container Logs only overview #202992
[Infra][ObsUX] Hosts & Container Logs only overview #202992
Conversation
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
The Log charts colour don't match the design. |
...gins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx
Outdated
Show resolved
Hide resolved
...gins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx
Outdated
Show resolved
Hide resolved
...gins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx
Outdated
Show resolved
Hide resolved
...gins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx
Outdated
Show resolved
Hide resolved
...ugins/observability_solution/infra/public/components/asset_details/hooks/use_page_header.tsx
Outdated
Show resolved
Hide resolved
...ugins/observability_solution/infra/public/components/asset_details/hooks/use_page_header.tsx
Outdated
Show resolved
Hide resolved
...rvability_solution/infra/public/components/asset_details/components/kpis/logs_kpi_charts.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some nits
...plugins/observability_solution/infra/public/components/asset_details/hooks/use_log_charts.ts
Outdated
Show resolved
Hide resolved
...plugins/observability_solution/infra/public/components/asset_details/hooks/use_log_charts.ts
Outdated
Show resolved
Hide resolved
...ugins/observability_solution/infra/public/components/asset_details/hooks/use_page_header.tsx
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
@elasticmachine merge upstream |
const LOG_RATE = i18n.translate('xpack.infra.assetDetails.charts.logRate', { | ||
defaultMessage: 'Log Rate', | ||
}); | ||
|
||
const LOG_ERROR_RATE = i18n.translate('xpack.infra.assetDetails.charts.logErrorRate', { | ||
defaultMessage: 'Log Error Rate', | ||
}); | ||
|
||
const logMetric: LensConfig & { id: string } = { | ||
id: 'logMetric', | ||
chartType: 'metric', | ||
title: LOG_RATE, | ||
label: LOG_RATE, | ||
trendLine: true, | ||
value: 'count()', | ||
format: 'number', | ||
decimals: 1, | ||
normalizeByUnit: 's', | ||
}; | ||
|
||
const logErrorMetric: LensConfig & { id: string } = { | ||
id: 'logErrorMetric', | ||
chartType: 'metric', | ||
title: LOG_ERROR_RATE, | ||
label: LOG_ERROR_RATE, | ||
trendLine: true, | ||
value: | ||
'count(kql=\'log.level: "error" OR log.level: "ERROR" OR error.log.level: "error" OR error.log.level: "ERROR"\')', | ||
format: 'number', | ||
decimals: 1, | ||
normalizeByUnit: 's', | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather centralize these formulas here x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/**/formulas
but I understand it'd be a relatively big change because the structure is not prepared to support logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe as a follow-up PR? That way, we don't pollute this one with too many changes and then this change can be evaluated as its own thing?
...plugins/observability_solution/infra/public/components/asset_details/hooks/use_log_charts.ts
Outdated
Show resolved
Hide resolved
...plugins/observability_solution/infra/public/components/asset_details/hooks/use_log_charts.ts
Outdated
Show resolved
Hide resolved
...ugins/observability_solution/infra/public/components/asset_details/hooks/use_page_header.tsx
Outdated
Show resolved
Hide resolved
...lity_solution/infra/public/components/asset_details/components/kpis/container_kpi_charts.tsx
Outdated
Show resolved
Hide resolved
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
|
Starting backport for target branches: 8.17, 8.x https://github.com/elastic/kibana/actions/runs/12260624734 |
## 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)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
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
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. 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]>
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
1 similar comment
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
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).
Recording.2024-12-04.183310.mp4
Closes #201752
How to test
This is tested using synthtrace data, loading the scenario below:
This loads a logs-only host, though if other scenarios contain logs only containers, feel free to use those as well.