Skip to content

ref(mcp): Call shared replay endpoints - #1850

Merged
BYK merged 1 commit into
ref/shared-trace-profile-snapshot-endpointsfrom
ref/shared-replay-endpoints
Nov 3, 2026
Merged

BYK merged 1 commit into
ref/shared-trace-profile-snapshot-endpointsfrom
ref/shared-replay-endpoints

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Task 8.4 of the shared API client plan (#1669). This is stacked on #1841 and is the last PR in the stack.

This moves the replay endpoints from SentryApiService into toolkit-core's api-client/endpoints/replays. SentryApiService calls them with its Zod schemas. The code moves as is.

  • searchReplays keeps the same query: query, per_page, project, sort, repeated environment and field, and the time range.
  • getReplay and listIssueReplayIds. SentryApiService still unwraps the { data } envelope and picks the issue's entry from the keyed replay-count result.
  • visitReplayRecordingSegments still pages 100 segments at a time, follows the Link cursor, and stops at maxSegments, with truncated set the same way as before. It reads the cursor with the shared nextPageCursor, which parses the header the same way the old getNextCursor did.
  • docs/contributing/api-patterns.md gets a short "Where Endpoint Code Lives" section that describes the pattern this stack follows.

One change in behaviour: as with #1741, a response that fails its schema now throws the shared ApiResponseValidationError instead of a ZodError.

Checked with pnpm run tsc, pnpm run lint, pnpm run docs:check, and the toolkit-core, mcp-core, mcp-server bundle, and mcp-cloudflare tests on this branch before the last rebase. pnpm run tsc passes again after rebasing onto the current main.

via @BYK.

--

View Session [Sentry]

Moves the replay search, replay details, issue replay IDs, and recording
segment endpoints from SentryApiService into toolkit-core's shared API
client, as is. SentryApiService unwraps the data envelopes and picks the
issue's IDs.

Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
@vercel

vercel Bot commented Nov 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sentry-local Ready Ready Preview Nov 3, 2026 11:32am UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 3, 2026
@BYK
BYK added this pull request to stack #1851 November 3, 2026 12:12
@BYK
BYK merged commit f99c528 into main Nov 3, 2026
36 checks passed
@BYK
BYK deleted the ref/shared-replay-endpoints branch November 3, 2026 12:13

This branch was successfully deployed

1 active deployment
Preview — 2c5c7ec6 Deployed Nov 3, 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