File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
packages/overlay/src/integrations/sentry/components/explore/traces/spans Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @spotlightjs/spotlight ' : patch
3+ ' @spotlightjs/electron ' : patch
4+ ' @spotlightjs/overlay ' : patch
5+ ' @spotlightjs/astro ' : patch
6+ ---
7+
8+ Fix span details showing incorrect span start time
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ export default function SpanDetails({
8686 totalDuration : number ;
8787} ) {
8888 const [ spanNodeWidth , setSpanNodeWidth ] = useState < number > ( 50 ) ;
89+ const spanRelativeStart = span . start_timestamp - startTimestamp ;
8990
9091 const spanDuration = span . timestamp - span . start_timestamp ;
9192
@@ -115,15 +116,15 @@ export default function SpanDetails({
115116 < DateTime date = { span . start_timestamp } />
116117 < span > —</ span >
117118 < span >
118- < strong > { getFormattedDuration ( spanDuration ) } </ strong > into trace
119+ < strong > { getFormattedDuration ( spanRelativeStart ) } </ strong > into trace
119120 </ span >
120121 </ div >
121122 < div className = "flex-1" >
122123 < div className = "border-primary-800 relative h-8 border py-1" >
123124 < div
124125 className = "bg-primary-800 absolute bottom-0 top-0 -m-0.5 flex w-full items-center p-0.5"
125126 style = { {
126- left : `min(${ ( spanDuration / totalDuration ) * 100 } %, 100% - 1px)` ,
127+ left : `min(${ ( spanRelativeStart / totalDuration ) * 100 } %, 100% - 1px)` ,
127128 width : `max(1px, ${ ( spanDuration / totalDuration ) * 100 } %)` ,
128129 } }
129130 >
You can’t perform that action at this time.
0 commit comments