Skip to content

Visual Clock Drift Correction in Trace Waterfall #132136

Open

Description

@Lms24

Problem Statement

Today, clock drift in distributed traces leads to trace waterfalls where parent/child spans are visually misaligned, making it very hard to reason about the actual trace. Here's an example:

image

While the http.server subtree is a child of the http.client request, the clock skew makes it appear 2 minutes earlier than the client request.

SDK-side, we cannot fully correct this drift because we need to trust some local clock. Especially in browsers, but generally in client-side devices and apps, clock drift is really common, for example due to NTP corrections or users manually setting a time. Relay shifts timestamps for massively skewed telemetry (over an hour), but the finer skews can't be post-detected either.

Solution Brainstorm

In the trace waterfall, we can detect out of sync spans pretty easily, for example by checking for clock drift between http.client and http.sever span siblings. Once detected, we can shift the sub-tree so that the trace appears aligned again. Importantly, the UI must explain that we did this and why, and it should be toggle-able.

Tracking:

Product Area

Trace Explorer / Waterfall

Activity

  1. linear-code commented on Nov 23, 2026

    @linear-code
  2. self-assigned this
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions