#Query span timestamps and calculate deltas

4 messages · Page 1 of 1 (latest)

frosty fox
#

Hi all,

I’m trying to measure the latency between two spans (a parent span and child span) in our Bun SDK setup.

Both spans already appear in Traces, share the same trace_id, and from what i see in the sdk have their own timestamp fields. All I want is to aggregate the delta:

child.start_timestamp – parent.start_timestamp (p50/p95 across all traces).

I can’t find any way in Discover (transactions is being deprecated) or the Traces dashboard to calculate this. The UI only shows per-trace waterfalls, no start-offset column, and no way to aggregate percentiles. Metrics aren’t available in the Bun SDK, so I can’t emit this as a distribution metric either.

I know I can add custom timestamp attributes in my Sentry.startSpan() calls, but the timestamps already exist on the spans. The problem is simply that I can’t query the relationship. Am i missing anything obvious in how to use the traces dashboard to view this data?

Thanks!

frosty fox
rotund field
#

Feel free to leave a comment about your use case @frosty fox. We query on comments/GH upvotes when planning new features

frosty fox
#

@rotund field just one question: is there any public start_timestamp field on a Span via getActiveSpan()? i would like to avoid prop drilling the parent spans' start time through my codepath