getsentry / getsentry/sentry-react-native

Test with JS SDK Alpha and Beta releases

Open
#6,656 1 comment 0 reactions 1 assignee Claimed by @antonis View on GitHub
React-Native
Dominant language
TypeScript
Stars
1.8k
Forks
366
Avg merge
1d 9h
Merged PRs (30d)
89

Description

## Overview

Track the `@sentry/*` JavaScript SDK **v11 alpha/beta** pre-releases and document the compatibility work needed in the React Native SDK ahead of the real v11 bump.

Each pre-release: bump the first-party `@sentry/*` deps, build, run the test suite, and record the breaking changes and what they require here.

## Alpha 2 — `11.0.0-alpha.2`

Spike: #6655 (draft, opened to exercise CI).

`yarn build` (tsc) compiles clean after the adaptations below.

### Breaking changes handled in the SDK source
- **Span streaming model** — `spanToJSON()` now returns the streamed shape (`name`/`attributes`/`end_timestamp`, `status` collapsed to `ok`/`error`). Internals that need the classic `SpanJSON` switched to `spanToStaticSpanJSON()`.
- **Event filters rename** — `inboundFiltersIntegration` → `eventFiltersIntegration` (re-exported under the existing RN public name).
- **AI instrumentation removed from core** — OpenAI/Anthropic/Google GenAI/LangChain/LangGraph helpers moved to the server-only `@sentry/server-utils` (RN does not depend on it); re-exports and types dropped.
- **`SEMANTIC_ATTRIBUTE_SENTRY_SOURCE`** replaced by `SENTRY_SEGMENT_NAME_SOURCE`.
- **Tightened typings** — `ExtendedError` and `User` index signatures `any` → `unknown`; `User.name` dropped from the typed interface.
- **RN-owned options** — `enableLogs` and `sendDefaultPii` are no longer on core's client options (core removed them / RN `Omit`s `dataCollection`); RN declares them itself.
- **`Scope.clear()` removed** — MIGRATION.md advises `withScope`/`withIsolationScope` or SDK re-init; the test harness was migrated onto a `clearAllScopes()` helper.

### TypeScript minimum version

v11 raises the minimum TypeScript to `5.0.4` and stops emitting down-leveled types, which retires the SDK's current TS 3.8 floor (this is what fails the `Type Check TypeScript 3.8` CI job on #6655). Tracked separately as a v9 next-major task: **#6657**.

### Open follow-ups
- [ ] Test assertions still reading the old span shape (`spanToJSON(...).status`/`.data`) — apply the `spanToStaticSpanJSON` swap on the test side.
- [ ] `aiExports.test.ts` asserts the now-removed AI re-exports — obsolete, delete.
- [ ] `measurements` coming back `undefined` in stall-tracking / native-frames transactions — investigate (possible real v11 behavior change).
- [ ] Regenerate the API report and add a `CHANGELOG.md` entry once the approach is confirmed.

## Alpha / Beta releases

- [x] `11.0.0-alpha.2`
- [ ] later alpha / beta / rc releases

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.