import type {Theme} from '@emotion/react'; import {PlatformIcon} from 'platformicons'; import {t} from 'sentry/locale'; import {TraceIcons} from '../traceIcons'; import type {TraceTree} from '../traceModels/traceTree'; import type {TraceTreeNode} from '../traceModels/traceTreeNode'; import {InvisibleTraceBar} from '../traceRow/traceBar'; import { maybeFocusTraceRow, TraceRowConnectors, type TraceRowProps, } from '../traceRow/traceRow'; const ERROR_LEVEL_LABELS: Record = { sample: t('Sample'), info: t('Info'), warning: t('Warning'), // Hardcoded legacy color (orange400). We no longer use orange anywhere // else in the app (except for the chart palette). This needs to be harcoded // here because existing users may still associate orange with the "error" level. error: t('Error'), fatal: t('Fatal'), default: t('Default'), unknown: t('Unknown'), }; export function TraceErrorRow(props: TraceRowProps>) { return (
props.tabIndex === 0 && !props.isEmbedded ? maybeFocusTraceRow(r, props.node, props.previouslyFocusedNodeRef) : null } tabIndex={props.tabIndex} className={`TraceRow ${props.rowSearchClassName} ${props.node.maxIssueSeverity}`} onClick={props.onRowClick} onKeyDown={props.onRowKeyDown} style={props.style} >
{' '}
{ERROR_LEVEL_LABELS[props.node.value.level ?? 'error']} {props.node.value.message ?? props.node.value.title}
{typeof props.node.value.timestamp === 'number' ? (
) : null}
); }