-
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
[One Discover] Display stacktrace in the logs overview tab #204521
base: main
Are you sure you want to change the base?
Conversation
/ci |
e11d28d
to
b41227d
Compare
/ci |
/ci |
/ci |
/ci |
/oblt-deploy |
/ci |
/ci |
/ci |
/ci |
1 similar comment
/ci |
/ci |
@@ -40,7 +40,7 @@ export function ExceptionStacktraceTitle({ | |||
} | |||
|
|||
return ( | |||
<EuiTitle size="xs"> | |||
<EuiTitle size="xxs"> |
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.
/oblt-deploy |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
/ci |
dataStreamTypeField === APM_ERROR_DATASTREAM_FIELDS.dataStreamType && | ||
dataStreamDatasetField === APM_ERROR_DATASTREAM_FIELDS.dataStreamDataset | ||
) { | ||
return <ApmStacktrace hit={hit} dataView={dataView} />; |
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.
This component is only used for APM data, as it requires the APM data model to be displayed properly.
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
|
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.
src/dev/storybook/aliases.ts
LGTM
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
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 made a first pass, the functionalities work and the new code LGTM, I left some questions/suggestions but overall looks good!
@@ -148,14 +149,18 @@ setUnifiedDocViewerServices( | |||
const renderLogsOverview = (props: Partial<DocViewRenderProps> = {}) => { | |||
const { rerender: baseRerender, ...tools } = render( | |||
<EuiProvider> | |||
<LogsOverview dataView={dataView} hit={fullHit} {...props} /> | |||
<IntlProvider locale="en"> |
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.
question: Can you explain why we need an explicit provider for intl here?
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.
note: With the changes done in #200958, this file shouldn't be necessary anymore. You only need to update the import for the typings in the tsconfig file.
@@ -47,6 +51,7 @@ export function LogsOverview({ | |||
<EuiHorizontalRule margin="xs" /> | |||
<LogsOverviewHighlights formattedDoc={parsedDoc} flattenedDoc={hit.flattened} /> | |||
<LogsOverviewDegradedFields rawDoc={hit.raw} /> | |||
{isStacktraceAvailable && <LogsOverviewStacktraceSection hit={hit} dataView={dataView} />} |
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.
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.
note: With the changes done in #200958, this file shouldn't be necessary anymore. You only need to update the import for the typings in the tsconfig file.
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.
note: I was about to suggest we already have a shared object flattening function, but looking at the implementation it has a different purpose than object flattening.
Probably it was fine to use it in the scope of APM only, but this naming is quite generic for a utility now exported on a shared package, specially since it matches another exported utility.
Could we rename this to something more specific to what it does, maybe getFlattenedKeyValuePairs
📓 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 #190460
APM - Log stacktrace (library frames)
APM - Exception (with cause)
APM - Exception (simple stacktrace)
Apache Tomcat Integration (Catalina) - Stacktrace
📝 Notes for reviewers
@kbn/apm-types
package was marked as platform / shared as it's being used by the unified_doc_viewer@kbn/event-stacktrace
package as it is reused in theunified_doc_viewer
@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:
service.name: "synth-node-0" OR apache_tomcat :*
, Time range: Jan 1, 2025 - now)