test(test-utils): Add fetchSpanAttributes to read span attributes via the sentry CLI - #24514
Merged
Merged
Conversation
JPeer264
added this pull request to stack #24516
September 18, 2026 18:47
JPeer264
marked this pull request as ready for review
September 18, 2026 18:49
Contributor
size-limit report 📦
|
Contributor
|
👋 @mydea, @andreiborza — Please review this PR when you get a chance! |
JPeer264
force-pushed
the
jp/test-utils-fetch-span-attributes
branch
from
September 28, 2026 08:00
5420b4c to
4433dfc
Compare
… the sentry CLI `sentry trace view --json` drops all attributes of a span when the trace-items endpoint returns an `int` attribute, because the endpoint sends those values as strings and the CLI's schema rejects them. Read the attributes through `sentry api` instead, and share the CLI runner with fetchTrace. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
JPeer264
force-pushed
the
jp/test-utils-fetch-span-attributes
branch
from
September 28, 2026 09:19
4433dfc to
9ac9641
Compare
Contributor
|
👋 @mydea, @andreiborza — Please review this PR when you get a chance! |
mydea
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is helpful for the stacked PR where we add a test for workers-ai
Adds
fetchSpanAttributes(traceId, spanId)to@sentry-internal/test-utils/cli, so send-to-sentry E2E tests can assert span attributes and not only the span op.sentry trace view --jsonlooks like it returns span attributes, but it silently drops all of them for most spans: the trace-items endpoint sendsintattribute values as strings, the CLI's schema (0.44.1 and 0.45.0) expects numbers, and a failed schema check only logsCould not fetch details for span. The helper calls the same endpoint throughsentry api, which does no schema check. The spawn and credential handling moved into a shared runner so both helpers use the E2E token the same way.🤖 Generated with Claude Code