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

[APM] Add Unhandled badge to sample summary #148406

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export function ErrorSampleDetails({
const status = error.http?.response?.status_code;
const environment = error.service.environment;
const serviceVersion = error.service.version;
const isUnhandled = error.error.exception?.[0].handled === false;

const traceExplorerLink = router.link('/traces/explorer/waterfall', {
query: {
Expand Down Expand Up @@ -294,6 +295,13 @@ export function ErrorSampleDetails({
<EuiBadge color="hollow">{serviceVersion}</EuiBadge>
</EuiToolTip>
) : null,
isUnhandled ? (
<EuiBadge color="warning">
{i18n.translate('xpack.apm.errorGroupDetails.unhandledLabel', {
defaultMessage: 'Unhandled',
})}
</EuiBadge>
) : null,
]}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { EuiText, EuiSpacer, EuiCodeBlock, EuiBadge } from '@elastic/eui';
import { EuiText, EuiSpacer, EuiCodeBlock } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import { euiStyled } from '@kbn/kibana-react-plugin/common';
Expand All @@ -24,20 +24,9 @@ export function SampleSummary({ error }: Props) {
const logMessage = error.error.log?.message;
const excMessage = error.error.exception?.[0].message;
const culprit = error.error.culprit;
const isUnhandled = error.error.exception?.[0].handled === false;

return (
<>
{isUnhandled && (
<>
<EuiBadge color="warning">
{i18n.translate('xpack.apm.errorGroupDetails.unhandledLabel', {
defaultMessage: 'Unhandled',
})}
</EuiBadge>
<EuiSpacer />
</>
)}
{logMessage && (
<>
<EuiText size="s">
Expand Down