[4366] fix(frontend): exclude annotations from raw span view#4505
[4366] fix(frontend): exclude annotations from raw span view#4505ashrafchowdury wants to merge 2 commits into
Conversation
Annotations are a frontend sidecar attached to trace nodes by attachAnnotationsToTraces, not part of the backend span payload. Their evaluator inputs often embed a snapshot of the trace subtree, which made a parent span's Raw Data tab visually surface as if it contained its children. Annotations are already rendered in their own dedicated tab. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughA single helper file is updated to support an optional ChangesTrace Span Annotations Field Support
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Railway Preview Environment
Updated at 2026-06-01T07:11:35.703Z |
|
Thanks @ashrafchowdury but I actually kept it intentionally. The idea is that we would allow a user to add the traces including the annotation to a test set directly (and show thereby the annotations in the raw view). |
Summary
Closes #4366.
When a user opened the Raw Data tab on a parent span, the JSON payload still appeared to contain its child spans even after PR #4417 stripped
spans/children/key/invocationIds/aggregatedEvaluatorMetrics.The remaining leak comes from
annotations. An annotation's evaluator inputs often embed a full snapshot of the trace subtree, e.g.:That snapshot reads visually as "child spans are showing up in the parent's raw view."
The fix
Add
annotationsto the strip list in getRawTraceSpanData.Annotations:
traceSpanSchema, not inTraceSpan/TraceSpanNode),So dropping them from Raw Data removes the embedded trace snapshot with no UX loss.
Test plan
annotationsfield (and therefore no nestedspans/parent_idfrom child spans)pnpm lint-fixinwebpasses (already verified locally)🤖 Generated with Claude Code