feat: add reverse span links, show span link detail - #3011
Conversation
🦋 Changeset detectedLatest commit: 0f36252 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🟡 Tier 3 — StandardIntroduces new logic, modifies core functionality, or touches areas with non-trivial risk. Why this tier:
Review process: Full human review — logic, architecture, edge cases. Stats
|
Greptile SummaryThe PR adds resolved forward span-link details, reverse-link discovery, and breadcrumb-aware navigation between linked spans.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/app/src/components/linkedSpans.tsx | Adds bounded forward and reverse span queries, result conversion, hooks, and shared metadata rendering. |
| packages/app/src/components/DBRowOverviewPanel.tsx | Integrates resolved forward links and the new reverse-link section into the span overview. |
| packages/app/src/components/DBRowSidePanel.tsx | Adds origin-aware reciprocal-link navigation that returns to the preceding breadcrumb. |
| packages/app/src/components/SpanLinkedFromSubpanel.tsx | Adds the reverse-link list UI with navigation and expandable rows. |
| packages/app/src/components/SpanLinksSubpanel.tsx | Enhances forward links with resolved span metadata while retaining the unresolved fallback. |
| packages/app/tests/e2e/features/span-links.spec.ts | Exercises forward links, reverse links, resolved details, and reciprocal breadcrumb navigation. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Selected span] --> B[Resolve forward links]
A --> C[Find reverse links]
B --> D[Span links section]
C --> E[Linked from section]
D --> F[Open linked span]
E --> F
F --> G{Targets previous span?}
G -->|Yes| H[Pop breadcrumb]
G -->|No| I[Push source frame]
Reviews (4): Last reviewed commit: "edd e2e tests" | Re-trigger Greptile
9885865 to
5208e25
Compare
E2E Test Results✅ All tests passed • 325 passed • 1 skipped • 1094s
Tests ran across 4 shards in parallel. |
Deep Review✅ No critical issues found. This PR adds reverse span-link discovery, resolves forward-link target details, and adds breadcrumb pop-back navigation for reciprocal A↔B link hops. The SQL construction was independently verified as injection-safe (source-config expressions are 🟡 P2 -- recommended
🔵 P3 nitpicks (3)
Reviewers (7): correctness, performance, security, kieran-typescript, testing, maintainability, previous-comments. Testing gaps: No unit assertion that runtime |
5208e25 to
b8819a4
Compare
pulpdrew
left a comment
There was a problem hiding this comment.
LGTM, and seems to work well.
Left a suggestion for another option if we're worried about the performance impact.
|
One other callout is that it may be good to add an E2E test for this functionality, to prevent regressions in the future. |
b8819a4 to
0f36252
Compare
pulpdrew
left a comment
There was a problem hiding this comment.
LGTM, thanks for adding the test!
Summary
Span links were only usable from the consumer side: a span showed the links it carries, as bare "Open trace" actions. There was no way to start from a producer span and find the consumer spans that link back to it.
SourceFramegains an optional, source-agnosticoriginRowIdfor this.useQueriedChartConfigbounded to a time window anchored on the selected span, skewed in the direction links point in time: referencing spans run at/after the span (−1h/+24h), linked-to spans ran at/before it (−24h/+1h).Screenshots or video
Untitled.mov
How to test on Vercel preview
Preview routes:
/searchSteps:
Links.SpanId != [])References