Skip to content

Conversation

@xenonnn4w
Copy link

@xenonnn4w xenonnn4w commented Dec 10, 2025

Which problem is this PR solving?

Description of the changes

  • Added orphan span detection to identify traces with spans referencing
    non-existent parent spans (indicating potentially incomplete traces)
  • Added hasOrphanSpans and orphanSpanCount fields to the Trace type
  • Added orange "Incomplete" warning tag in search results for traces with
    orphan spans
  • Added warning banner in trace view header for incomplete traces
  • Added new search.adjustTime config option that shifts the search end
    time back by a specified duration (e.g., "1m") to exclude very recent
    traces that may still be receiving spans
  • UI shows the adjustment suffix in lookback dropdown options (e.g., "Last
    Hour (-1m)")
  • Added traceWithOrphans helper in demo trace generators for testing

How was this change tested?

  • Added unit tests for orphan span detection in
    transform-trace-data.test.js (5 new tests)
  • Added unit tests for applyAdjustTime function in SearchForm.test.js
    (7 new tests)
  • Manually verified orphan detection logic via browser console
  • Manually verified adjustTime config shows suffix in lookback dropdown
  • All existing tests pass

Search Results - Incomplete Trace Warning Tag

Search results showing an incomplete trace with an orange "Incomplete" warning tag.
The tag indicates the trace has spans with missing parent spans, suggesting the trace
may be incomplete due to late-arriving data.

Screenshot From 2025-12-22 22-33-52

Trace Detail Page - Incomplete Indicator

Trace detail view showing the "Incomplete" indicator inline with the Total Spans
count in the header summary row. The tooltip provides details: "This trace may be
incomplete.

Screenshot From 2025-12-23 10-20-24

Search Form - Lookback with Time Adjustment Toggle

Search form showing the Lookback field with a time adjustment toggle beside the Lookback(on the right). When adjustTime is configured (e.g., "1m"), a toggle switch appears with the label "Adjusted -1m" and an info icon (?). Clicking the info icon
reveals a popover explaining that when enabled, the search end time is adjusted back by the configured duration to exclude very recent traces that may still be receiving spans. The toggle state is persisted in local storage, allowing users to enable/disable the adjustment as needed.

Screenshot From 2025-12-24 11-37-42

Checklist

@xenonnn4w xenonnn4w requested a review from a team as a code owner December 10, 2025 17:11
@xenonnn4w xenonnn4w requested review from mahadzaryab1 and removed request for a team December 10, 2025 17:11
@xenonnn4w xenonnn4w changed the title feat: Add incomplete trace feat: Add incomplete trace detection and adjustable search time offset Dec 11, 2025
@xenonnn4w
Copy link
Author

@yurishkuro, may I get your review on this?

@yurishkuro
Copy link
Member

  • Please provide screenshots indicating the changes
  • Please resolve conflicts

@xenonnn4w xenonnn4w force-pushed the fix/incomplete-traces-warning branch from f238ea6 to 09c8da2 Compare December 22, 2025 14:49
@xenonnn4w
Copy link
Author

@yurishkuro rebased and updated the pr description with the required screenshots, Thanks!

@yurishkuro
Copy link
Member

yurishkuro commented Dec 22, 2025

thanks for the screenshots. I would like two changes:

  1. the whole new banner in the trace timeline view is overkill. You can just add an icon with the word "incomplete" in the next row next to the span count. The full text of the banner can go into a tooltip - it's low signal to always show it once the user knows what "incomplete" means.

  2. the (-1m) in the time picker is distracting and unnecessary. You can put an info (?) icon next to the word Lookback and explain the -1m offset there.

@xenonnn4w xenonnn4w force-pushed the fix/incomplete-traces-warning branch 2 times, most recently from c3cca6f to f5ca93a Compare December 23, 2025 05:11
@xenonnn4w
Copy link
Author

@yurishkuro updated the code and screenshots in the description with you requested changes. Thanks.

@xenonnn4w xenonnn4w force-pushed the fix/incomplete-traces-warning branch 2 times, most recently from a7ac25b to 776d0aa Compare December 23, 2025 17:17
@yurishkuro
Copy link
Member

Can we make "Adjusted -1m" to appear on the same line as Lookback label, only flushed right? The form already has the Go button below the fold on my screen, we don't want to make it longer.

@xenonnn4w xenonnn4w force-pushed the fix/incomplete-traces-warning branch from a6e651c to b916dd3 Compare December 24, 2025 06:09
detection and adjustable search time offset

Signed-off-by: Snowiee <[email protected]>
@xenonnn4w xenonnn4w force-pushed the fix/incomplete-traces-warning branch from b916dd3 to 82aea86 Compare December 24, 2025 06:12
@xenonnn4w
Copy link
Author

@yurishkuro updated, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incomplete recent recent traces with elasticsearch backend

2 participants