Skip to content

Commit

Permalink
fix bug returning errors on spans that have a status.code === 1
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Tackett <[email protected]>
  • Loading branch information
Adam Tackett committed Jan 14, 2025
1 parent 3f35441 commit f595ed1
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ export const getTableColumns = (
'No'
);

const renderStatusCodeErrorsField = (item: number) =>
item === undefined || item === null ? (
'-'
) : item === 2 ? ( // Error status code is 2
<EuiText color="danger" size="s">
Yes
</EuiText>
) : (
'No'
);

const renderDurationField = (item: number) =>
item ? <EuiText size="s">{round(nanoToMilliSec(Math.max(0, item)), 2)}</EuiText> : '-';

Expand Down Expand Up @@ -166,7 +177,7 @@ export const getTableColumns = (
name: 'Errors',
align: 'right',
sortable: true,
render: renderErrorsField,
render: renderStatusCodeErrorsField,
},
{
field: 'endTime',
Expand Down

0 comments on commit f595ed1

Please sign in to comment.