import {TraceIcons} from '../traceIcons'; import type {TraceTree} from '../traceModels/traceTree'; import type {TraceTreeNode} from '../traceModels/traceTreeNode'; import {makeTraceNodeBarColor, TraceBar} from '../traceRow/traceBar'; import { maybeFocusTraceRow, TRACE_COUNT_FORMATTER, TraceChildrenButton, TraceRowConnectors, type TraceRowProps, } from '../traceRow/traceRow'; const NO_PROFILES = []; export function TraceSpanRow(props: TraceRowProps>) { return (
props.tabIndex === 0 ? maybeFocusTraceRow(r, props.node, props.previouslyFocusedNodeRef) : null } tabIndex={props.tabIndex} className={`TraceRow ${props.rowSearchClassName} ${props.node.hasErrors ? props.node.maxIssueSeverity : ''}`} onPointerDown={props.onRowClick} onKeyDown={props.onRowKeyDown} style={props.style} >
{props.node.children.length > 0 || props.node.canFetch ? ( ) } status={props.node.fetchStatus} expanded={props.node.expanded || props.node.zoomedIn} onDoubleClick={props.onExpandDoubleClick} onClick={e => props.node.canFetch ? props.onZoomIn(e) : props.onExpand(e) } > {props.node.children.length > 0 ? TRACE_COUNT_FORMATTER.format(props.node.children.length) : null} ) : null}
{props.node.value.op ?? ''} {!props.node.value.description ? props.node.value.span_id ?? 'unknown' : props.node.value.description.length > 100 ? props.node.value.description.slice(0, 100).trim() + '\u2026' : props.node.value.description}
); }