Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
sentry-junior
Bot
force-pushed
the
ref/shared-trace-profile-snapshot-endpoints
branch
from
November 3, 2026 10:34
8c0252f to
8593c2e
Compare
sentry-junior
Bot
force-pushed
the
ref/shared-trace-profile-snapshot-endpoints
branch
from
November 3, 2026 10:48
8593c2e to
31c0c0e
Compare
BYK
approved these changes
Nov 3, 2026
Moves the trace, trace meta, flamegraph, transaction profile, profile chunk, and preprod snapshot endpoints from SentryApiService into toolkit-core's shared API client, as is. SentryApiService keeps the profile chunk unwrapping and profiler_id backfill. Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
ref/shared-trace-profile-snapshot-endpoints
branch
from
November 3, 2026 11:14
31c0c0e to
c996486
Compare
BYK
added a commit
that referenced
this pull request
Nov 3, 2026
Task 8.4 of the shared API client plan ([#1669](#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. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Ab061171f2ec2e6cf6f09a6828cadc9fa --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Ab061171f2ec2e6cf6f09a6828cadc9fa) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Ab061171f2ec2e6cf6f09a6828cadc9fa/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
sentry-junior Bot
added a commit
that referenced
this pull request
Nov 3, 2026
Resolve the client.ts conflict with #1841, which moved getTransactionProfile to the shared toolkit-core endpoint. Pass a TransactionProfileResponseSchema that validates speedscope bodies with LegacySpeedscopeProfileSchema and every other body with the strict TransactionProfileSchema. Add a test that a sample-format body without profile data is still rejected.
This branch was successfully deployed
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.
Task 8.4 of the shared API client plan (#1669). This is stacked on #1840.
This moves the trace, profiling, and preprod snapshot endpoints from
SentryApiServiceintotoolkit-core'sapi-client/endpoints/.SentryApiServicecalls them with its Zod schemas. The code moves as is.endpoints/traces:getTraceMetaandgetTrace, with the same defaults (14d,limit=1000,project=-1).endpoints/profiling:getFlamegraph(still escapes the transaction name),getTransactionProfile, andgetProfileChunks.SentryApiService.getProfileChunkkeeps the MCP-only shaping: it throwsApiNotFoundErrorwhen there are no chunks and backfillsprofiler_id.endpoints/snapshots:getSnapshot,getSnapshotImage, andgetLatestBaseSnapshot. They return the body unvalidated, as before.fetchImageByUrlstays inSentryApiService, since it isn't an endpoint.@sentry/apihas operations for all of these routes. The wrappers still build their requests by hand so the change stays a move. Switching them to the operations can follow.Intentional changes:
ApiResponseValidationErrorinstead of aZodError.getSnapshotwithcompactMetadata: falseno longer sends a trailing?with an empty query.ApiNotFoundErrorfor an empty chunk list carries the validated body asresponseBody, not the raw one.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 the top of the stack, plus the trace, profile, and snapshot tool tests on this commit.via @BYK.
--
View Session [Sentry]