Repository navigation
Conversation
…d before a rename Spans are captured when they end, so a child that ended before the segment span was renamed kept the old sentry.segment.name. The span buffer now refreshes it from the segment span when the trace is sent, unless the value was changed by the user or beforeSendSpan. Fixes #26080 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e1eae84. Configure here.
| .expect({ | ||
| span: container => { | ||
| const segmentNames = Object.fromEntries( | ||
| container.items.map(span => [span.name, span.attributes?.['sentry.segment.name']?.value]), |
There was a problem hiding this comment.
Test uses hard-coded attribute name
Low Severity
The new integration test asserts on 'sentry.segment.name' as a string literal. Testing conventions require span attribute assertions to use the @sentry/conventions constant (SENTRY_SEGMENT_NAME), matching the unit tests in this PR. Flagged because that conventions-constants rule is listed as applying to test files.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit e1eae84. Configure here.
size-limit report 📦Compared: 799e0f1 (PR test merge using develop at a1a1de0) Against: a1a1de0 (develop) · base run #65235 ✅ Baseline matches: this diff contains only this PR's changes.
|
Optional E2E testsSome optional checks were not successful. They do not block the merge. 6 not successful, 50 successful. See the run.
Successful checks
|


Why: With span streaming, each span copies the segment span's name into
sentry.segment.namewhen it ends. If the segment span is renamed later (Next.js does this on every request once the route is known), spans that ended earlier keep the old name and don't show up when searching by the final name. The span buffer now refreshes the value when the trace is sent, unless the user orbeforeSendSpanchanged it.Unsure about: Renames that Next.js applies only to the serialized segment span in
processSegmentSpan(late route fill-in,/_error, query stripping) are not picked up yet. I'd handle those in a follow-up.Closes #26080