Skip to content

fix(local): Title and count span batches in event list like the tail - #2485

Merged
MathurAditya724 merged 4 commits into
mainfrom
fix/local-span-list-labels
Nov 24, 2026
Merged

MathurAditya724 merged 4 commits into
mainfrom
fix/local-span-list-labels

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

sentry local event list and the tail disagreed about streamed spans.

  • Title. The list used the raw span name. Wrangler, Bun, and Deno name a request with no route just GET, so the list showed GET while the tail showed the URL. The list now uses the tail's own label for the batch.
  • Count. The list counted every span in the batch, but the tail's [N spans] leaves out the segment span itself. The list now counts the same spans, and hides a count of 0 like the tail does.
  • Server spans. For a request span with a URL and no route, the tail showed the host (GET localhost:8787, with / dropped). It now shows the path, the way the viewer already does and the docs describe. This also applies to a transaction that only sets its op in the trace context.

Before:

tail:  [http.server] GET /feedback [200] [9ms] [1 span]
list:  span (2) │ GET /feedback

tail:  [http.server] GET localhost:3107/ok [200] [1ms]     (wrangler)
list:  span (1) │ GET

tail:  [http.server] GET localhost:3107 [200] [1ms]        (request to /?q=1)
list:  span (1) │ GET /

After:

tail:  [http.server] GET /feedback [200] [9ms] [1 span]
list:  span (1) │ GET /feedback

tail:  [http.server] GET /ok [200] [1ms]
list:  span     │ GET /ok

tail:  [http.server] GET / [200] [1ms]
list:  span     │ GET /

Outgoing calls keep their host, such as GET localhost:3105/feedback. In --json, a span batch's count now means the spans the tail counts.

via @MathurAditya724.

--

View Session [Sentry]

`sentry local event list` named a span batch after its segment's raw span
name and counted every span in it, while the tail labels the segment from
its attributes and counts only the spans besides it. A request that
wrangler, Bun, or Deno names just `GET` showed as `GET` in the list, and
an Express request with one handler span showed `span (2)` next to the
tail's `[1 span]`. The list now takes its title and count from the tail's
own helpers.

Server spans with a URL and no route now show the path, as the viewer
does, so a request to `/?q=1` reads `GET /` instead of the host.

Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Nov 24, 2026 11:17am UTC
sentry-local Ready Ready Preview Nov 24, 2026 11:17am UTC

Request Review

…ce op

A span batch whose span name is not a string made `event list` and
`event view` throw for the whole session. Use the unnamed label instead.

A transaction with `contexts.trace.op` of `http.server` and no `sentry.op`
in its data now shows only its URL path, like a server span.

Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 40103c7. Configure here.

…ntext

Copying any trace-context op into the label attributes made a custom
transaction name, such as a `ui.action` one, lose to its URL path.

Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>
…abels

# Conflicts:
#	docs/cli/local-control-plane.md

@MathurAditya724 MathurAditya724 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed current head ec47508 with all earlier approved PR changes included. No actionable findings. The complete combined tree passed typecheck, lint and the full workspace test suite. Independent offline CLI wire QA covered a segment root plus child, a late two-span group without its root, an http.server transaction whose op lives only in contexts.trace, and an outgoing http.client span. Span event-list titles/counts agreed with the human tail (1 child, 2 late spans, 0 children for the outgoing root); server labels kept only /ok, outgoing labels retained api.example.invalid/api, and credentials/query/fragment text was absent from human/JSON observations. The actual main integration was verified to equal that tested combined tree before merge.

@MathurAditya724
MathurAditya724 merged commit c9929ac into main Nov 24, 2026
31 checks passed
@MathurAditya724
MathurAditya724 deleted the fix/local-span-list-labels branch November 24, 2026 11:33

This branch was successfully deployed

2 active deployments
Preview – sentry-local — ec475085 Deployed Nov 24, 2026 by vercel[bot]
Preview – cli — ec475085 Deployed Nov 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant