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

[One Discover] Display stacktraces in the log details flyout #190460

Closed
Tracked by #190457 ...
gbamparop opened this issue Aug 13, 2024 · 1 comment · Fixed by #204521
Closed
Tracked by #190457 ...

[One Discover] Display stacktraces in the log details flyout #190460

gbamparop opened this issue Aug 13, 2024 · 1 comment · Fixed by #204521
Assignees
Labels
Feature:Discover Discover Application Team:obs-ux-logs Observability Logs User Experience Team

Comments

@gbamparop
Copy link
Contributor

gbamparop commented Aug 13, 2024

📓 Summary

As logs and errors can contain stacktraces which might be useful during RCA, it would be great if they are available to users in a way that is easy to consume.

Currently, they can be displayed alongside other fields in Discover in the data table and the Table tab in the document flyout:

image

There are curated views in Observability such as the error details page in the APM UI that display well-formatted stacktraces and even include the library frames, when available:

Stacktrace without library frames

image

Stacktrace without library frames

image

The log details flyout in Discover could be enhanced by adding another section for displaying stacktraces. The components in APM UI could be used as a basis for this implementation.

✔️ Acceptance Criteria

  • A new section will be added to the log detail flyout, when there is a stacktrace available in the document, which will display a formatted stacktrace similar to APM

💡 Implementation hints

  • error.stack_trace, error.exception.stacktrace and error.log.stacktrace fields should be used to check whether a stacktrace is available
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 13, 2024
@gbamparop gbamparop added the Team:obs-ux-logs Observability Logs User Experience Team label Aug 14, 2024
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Aug 14, 2024
tonyghiani added a commit that referenced this issue Sep 11, 2024
## 📓 Summary

Closes #190457 

This change extracts the logic around the logs document
controls/indicator from Logs Explorer and registers the same controls in
Discover through the extension point added in #188762.

The controls are registered only for the `logs-data-source-profile`
contextual profile.


https://github.com/user-attachments/assets/40adfb19-357f-46e1-9d69-fc9c0860c832

## 👣 Next steps
- [ ] #190670
- [ ] #190460

---------

Co-authored-by: Marco Antonio Ghiani <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
@gbamparop gbamparop self-assigned this Dec 17, 2024
viduni94 pushed a commit to viduni94/kibana that referenced this issue Jan 23, 2025
…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]>
gbamparop added a commit to gbamparop/kibana that referenced this issue Jan 23, 2025
…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]>
(cherry picked from commit 368475e)

# Conflicts:
#	.github/CODEOWNERS
#	x-pack/platform/packages/shared/kbn-event-stacktrace/src/components/stacktrace/cause_stacktrace.tsx
#	x-pack/platform/packages/shared/kbn-event-stacktrace/src/components/stacktrace/frame_heading.tsx
#	x-pack/platform/packages/shared/kbn-event-stacktrace/src/components/stacktrace/library_stacktrace.tsx
#	x-pack/platform/packages/shared/kbn-event-stacktrace/src/components/stacktrace/stackframe.tsx
#	x-pack/platform/packages/shared/kbn-event-stacktrace/src/components/stacktrace/variables.tsx
#	x-pack/platform/packages/shared/kbn-key-value-metadata-table/src/formatted_value.tsx
#	x-pack/solutions/observability/plugins/apm/tsconfig.json
@gbamparop gbamparop added the Feature:Discover Discover Application label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application Team:obs-ux-logs Observability Logs User Experience Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants