Repository navigation
Conversation
📊 Type Coverage Diff✅ no issues found |
2785270 to
0c96acc
Compare
0c96acc to
92b761c
Compare
2207ef0 to
9dffbe7
Compare
9dffbe7 to
40e68bb
Compare
40e68bb to
7e0fa52
Compare
f2e5703 to
194eb38
Compare
The renderer and the trace styles imported them from the indicator components, pulling a React module into the renderer. Co-Authored-By: Claude <noreply@anthropic.com>
Bolds the corrected span count with Text instead of a raw strong, and uses t over tct where only strings are interpolated. Co-Authored-By: Claude <noreply@anthropic.com>
The tree keeps the count of corrected spans now, so nothing outside the tests collected the corrections anymore. Co-Authored-By: Claude <noreply@anthropic.com>
…pans Clock drift correction moves a span in the waterfall, but its profiles and issues are stored at the time it was recorded. The continuous profile links and the issues link built their time range from the moved space, which could open a range without the span's data. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Autogroups in a corrected subtree are shifted along with the spans they wrap, but the duration label of a group with several bars did not get the tooltip explaining the shift. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Span bar issue icons were placed only when their row rendered. After a zoom or pan, an icon kept the edge anchoring of the old view, while the duration label was placed for the current one, so the two could overlap. Redraw the icons with the bars, as autogrouped bars already do. Co-Authored-By: Lukas Stracke <lukas.stracke@sentry.io>
The issues link queried the trace node's recorded space, but the trace node is never shifted while its space is rewritten to the corrected bounds. Issues on server spans moved by clock drift correction fell outside the link's time range. Query the recorded range of the node and all of its drifted descendants instead. Co-Authored-By: Lukas Stracke <lukas.stracke@sentry.io>
The sentence wrapped in the default 225px tooltip, which left wide empty space on both sides compared to other tooltips. Co-Authored-By: Lukas Stracke <lukas.stracke@sentry.io>
4a50186 to
b58109d
Compare
There was a problem hiding this comment.
One gap left, in the same class as the issues-link fix:
tracePinnedAttribute.tsx (not touched here) builds its /events/ query range from tree.root.space. With correction on, refreshTraceSpace shrinks the root space to the corrected bounds, so server spans that were recorded outside them (e.g. the 2 min drift in the screenshots) fall out of the range. Their pinned attribute values then go missing for exactly the shifted spans. Using getRecordedSubtreeSpace(tree.root) for start/end should cover them, ideally with a test that pins an attribute on a shifted server span.
Everything else looks good. The consensus logic, the pageload swap ordering, autogroup and missing-instrumentation offsets, the preference storage when the flag is off, and the profile and issue link ranges all hold up, and the earlier threads are addressed.
Pinned attribute values were queried over the trace space, which clock drift correction rewrites to the corrected bounds. Spans moved by the correction were recorded outside of it, so their values were missing. The tree now keeps the range its spans were recorded in, also for appended trees, and the query uses it. Co-Authored-By: Lukas Stracke <lukas.stracke@sentry.io>
There was a problem hiding this comment.
Fixed in fd8b4352e97. The tree now keeps recorded_space, the range its spans were recorded in. refreshTraceSpace sets it and appendTree merges it, and the pinned attribute query reads it. It's a plain field instead of a getRecordedSubtreeSpace(tree.root) call in the hook, because the React Compiler memoizes that call on tree.root and would serve a stale range after the tree changes in place. Looks good to me otherwise.
Story previewsPreview the stories changed in this PR on the Vercel deployment: Preview deployment: https://sentry-fz4181qx4.sentry.dev |
This PR adds clock drift correction to the trace waterfall, gated behind the
trace-waterfall-clock-drift-correctionflag.When the clocks of a client and a server are not in sync, a server span can show up before or after the client request that caused it. This happens often on client-side apps, when user devices are (temporarily) out of sync or correting to NTP time or they their clocks manually. With getsentry/sentry-javascript#23054 in the JS SDK, we now more often adjust our telemetry togimestamps to the users' wall clock (it's the only somewhat reliable clock in browsers), which likely increased the amount of out-of-sync client and server span trees.
The correction shifts the server subtree into the client span that made the request. It can be toggled in the trace preferences and is off by default. Shifted spans show a clock icon on the subtree root, and their duration label and the details panel explain the shift on hover. The criteria for applying the clock drift correction are:
http.clientfollowed by ahttp.serverchild segmentClock drift makes traces across services hard to read, and the correction fixes the most common case. We want to try it with a few internal orgs first.
Screenshots
Clock drift correction toggle (off)
Clock drift correction toggle (on)
Raw waterfall (note the 2 min. drift)
Corrected waterfall
Waterfall tooltip
Detail panel tooltip
Testing
Some traces if anyone wants to check out the preview:
Flag: #132009. Rollout: getsentry/sentry-options-automator#10726.
🤖 Generated with Claude Code