forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[One Discover] Display stacktrace in the logs overview tab (elastic#2…
…04521) ## 📓 Summary Adds a new section to the overview tab in the log details flyout in Discover to display stacktrace information for logs and exceptions. In a follow-up, the stacktrace could be moved to a new tab in the log details flyout and actions can be added to the stacktrace (and quality) icons in the document table to open the relevant sections in the flyout. Closes elastic#190460 ### APM - Log stacktrace (library frames) <img width="1470" alt="image" src="https://github.com/user-attachments/assets/8991f882-d329-4bc5-aa37-424576bcee72" /> ### APM - Exception (with cause) <img width="1476" alt="image" src="https://github.com/user-attachments/assets/cfbf24a7-6f82-48f1-b275-5aac977411ac" /> ### APM - Exception (simple stacktrace) <img width="1474" alt="image" src="https://github.com/user-attachments/assets/fc0306c4-5fcd-4b74-bb0d-c1784a48d677" /> ### Apache Tomcat Integration (Catalina) - Stacktrace <img width="1472" alt="image" src="https://github.com/user-attachments/assets/281f1822-faea-4e2d-9515-c11a9ee12f50" /> ## 📝 Notes for reviewers - The `@kbn/apm-types` package was marked as platform / shared as it's being used by the [unified_doc_viewer](https://github.com/elastic/kibana/blob/main/src/plugins/unified_doc_viewer/kibana.jsonc) - The code used to render stacktraces in APM was moved into a new `@kbn/event-stacktrace` package as it is reused in the `unified_doc_viewer` - The code used to render metadata table in APM was moved into a new `@kbn/key-value-metadata-table` package ## 🧪 Testing instructions The deployed environments have sample logs that can be used (time range: Jan 1, 2025 - now). For a local setup, please follow the instructions below: 1. Ingest sample logs with stacktraces ([gist](https://gist.github.com/gbamparop/0da21ca7f65b24c4a9c071ce9e9b97b0)). Please note that these are test data and some fields that are not used by stacktraces might not be consistent 2. View relevant logs in Discover (Query: `service.name: "synth-node-0" OR apache_tomcat :*`, Time range: Jan 1, 2025 - now) --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
Showing
116 changed files
with
772 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,4 @@ | |
"kibanaUtils" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...oc_viewer/public/components/doc_viewer_logs_overview/logs_overview_stacktrace_section.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
import { EuiAccordion, EuiHorizontalRule, EuiTitle, useGeneratedHtmlId } from '@elastic/eui'; | ||
import { DataTableRecord } from '@kbn/discover-utils'; | ||
import { i18n } from '@kbn/i18n'; | ||
import React from 'react'; | ||
import type { DataView } from '@kbn/data-views-plugin/public'; | ||
import { StacktraceContent } from './sub_components/stacktrace/stacktrace_content'; | ||
|
||
const stacktraceAccordionTitle = i18n.translate( | ||
'unifiedDocViewer.docView.logsOverview.accordion.title.stacktrace', | ||
{ | ||
defaultMessage: 'Stacktrace', | ||
} | ||
); | ||
|
||
export function LogsOverviewStacktraceSection({ | ||
hit, | ||
dataView, | ||
}: { | ||
hit: DataTableRecord; | ||
dataView: DataView; | ||
}) { | ||
const accordionId = useGeneratedHtmlId({ | ||
prefix: stacktraceAccordionTitle, | ||
}); | ||
|
||
return ( | ||
<> | ||
<EuiAccordion | ||
id={accordionId} | ||
buttonContent={ | ||
<EuiTitle size="xs"> | ||
<p>{stacktraceAccordionTitle}</p> | ||
</EuiTitle> | ||
} | ||
paddingSize="m" | ||
initialIsOpen={false} | ||
data-test-subj="unifiedDocViewLogsOverviewStacktraceAccordion" | ||
> | ||
<StacktraceContent hit={hit} dataView={dataView} /> | ||
</EuiAccordion> | ||
<EuiHorizontalRule margin="xs" /> | ||
</> | ||
); | ||
} |
Oops, something went wrong.