Skip to content

fix(api): add 'array' to TraceItemAttributeType enum - #1344

Closed
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/api-attribute-type-array
Closed

sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/api-attribute-type-array

Conversation

@sentry

@sentry sentry Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

The Sentry API recently started returning attributeType: 'array' for some trace item attributes. This caused a ZodError in the MCP server because the TraceItemAttributeType enum in our schema definitions did not include 'array' as a valid type.

This PR updates:

  • The TraceItemAttributeType TypeScript union in packages/mcp-core/src/api-client/client.ts.
  • The TraceItemAttributeTypeSchema Zod enum in packages/mcp-core/src/api-client/client.ts.
  • The local traceItemAttributeTypeSchema Zod enum in packages/mcp-core/src/tools/support/search-events/utils.ts.

A new test case has been added to client.test.ts to ensure that attributeType: 'array' is correctly parsed.

Fixes MCP-SERVER-G89

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@github-actions github-actions Bot added the risk: low PR risk score: low label Sep 27, 2026

@sentry-junior sentry-junior 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.

Closing as a duplicate of #1273, not because array support is invalid. Both PRs address MCP-SERVER-G89 and make the same three production changes: the TraceItemAttributeType union and both Zod enums. The upstream organization_trace_item_attributes.py explicitly emits array attributes with tags[name,array] keys. #1273 already includes an MSW regression covering both parsing and attributeTypes filtering; this PR adds only a separate parsing test and no additional production behavior. Current checks are green on both heads. Keeping the earlier, already-reviewed #1273 as the single merge candidate.

@sentry-junior sentry-junior Bot closed this Sep 27, 2026
BYK pushed a commit that referenced this pull request Sep 30, 2026
…#1344)

isServerRunning() returned res.ok, so a sidecar that answers /health
with a non-2xx looked like no server at all. Spotlight's own sidecar
does exactly that — 4.11.8 throws 'ctx.req.query(...).toString is not a
function' on every request with current hono, so /health is a 500 while
the process still holds port 8969.

The CLI then tried to bind the occupied port, retried three times over
15s and exited with 'Port 8969 is in use after 3 retries'. In `local
run` that killed the user's dev command before it ever started, so no
events reached the terminal *or* Spotlight.

Treat any HTTP reply as proof the port is taken and attach instead; only
a transport failure now counts as 'no server'. consumeSSE already
reports when the stream will not open, so a non-sidecar squatter is
diagnosed rather than fatal. `run` also falls back to attaching if the
bind loses a race, since wrapping a dev command means a busy port must
never be fatal.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Aditya Mathur <MathurAditya724@users.noreply.github.com>
mr-danya pushed a commit to mr-danya/sentry-mcp that referenced this pull request Oct 6, 2026
…getsentry#1344)

isServerRunning() returned res.ok, so a sidecar that answers /health
with a non-2xx looked like no server at all. Spotlight's own sidecar
does exactly that — 4.11.8 throws 'ctx.req.query(...).toString is not a
function' on every request with current hono, so /health is a 500 while
the process still holds port 8969.

The CLI then tried to bind the occupied port, retried three times over
15s and exited with 'Port 8969 is in use after 3 retries'. In `local
run` that killed the user's dev command before it ever started, so no
events reached the terminal *or* Spotlight.

Treat any HTTP reply as proof the port is taken and attach instead; only
a transport failure now counts as 'no server'. consumeSSE already
reports when the stream will not open, so a non-sidecar squatter is
diagnosed rather than fatal. `run` also falls back to attaching if the
bind loses a race, since wrapping a dev command means a busy port must
never be fatal.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Aditya Mathur <MathurAditya724@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants