@ -29,20 +29,21 @@ import { SpanLinkFunc, TNil } from '../../types';
import { TraceKeyValuePair , TraceLink , TraceLog , TraceSpan , TraceSpanReference } from '../../types/trace' ;
import AccordianReferences from './AccordianReferences' ;
import { autoColor } from '../../Theme' ;
import { uAlignIcon , ubM0 , ubMb1 , ubMy1 , ubTxRightAlign } from '../../uberUtilityStyles' ;
import { Divider } from '../../common/Divider' ;
import {
uAlignIcon ,
ubFlex ,
ubFlexAuto ,
ubItemsCenter ,
ubM0 ,
ubMb1 ,
ubMy1 ,
ubTxRightAlign ,
} from '../../uberUtilityStyles' ;
const getStyles = ( theme : GrafanaTheme2 ) = > {
return {
header : css `
display : flex ;
align - items : flex - start ;
justify - content : space - between ;
gap : 0 1 rem ;
margin - bottom : 0.25rem ;
` ,
listWrapper : css `
overflow : hidden ;
` ,
debugInfo : css `
label : debugInfo ;
display : block ;
@ -173,6 +174,15 @@ export default function SpanDetail(props: SpanDetailProps) {
label : 'Start Time:' ,
value : formatDuration ( relativeStartTime ) ,
} ,
. . . ( span . childSpanCount > 0
? [
{
key : 'child_count' ,
label : 'Child Count:' ,
value : span.childSpanCount ,
} ,
]
: [ ] ) ,
] ;
const styles = useStyles2 ( getStyles ) ;
const link = createSpanLink ? . ( span ) ;
@ -180,9 +190,11 @@ export default function SpanDetail(props: SpanDetailProps) {
return (
< div >
< div className = { cx ( ubFlex , ubItemsCenter , ubMb1 ) } >
< h2 className = { cx ( ubFlexAuto , ubM0 ) } > { operationName } < / h2 >
< LabeledList className = { ubTxRightAlign } items = { overviewItems } / >
< div className = { styles . header } >
< h2 className = { cx ( ubM0 ) } > { operationName } < / h2 >
< div className = { styles . listWrapper } >
< LabeledList className = { ubTxRightAlign } divider = { true } items = { overviewItems } / >
< / div >
< / div >
{ link ? (
< DataLinkButton link = { { . . . link , title : 'Logs for this span' } as any } buttonProps = { { icon : 'gf-logs' } } / >